Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reindexEncrypted and leveldb indexes #415

Open
staltz opened this issue Jan 17, 2023 · 0 comments
Open

reindexEncrypted and leveldb indexes #415

staltz opened this issue Jan 17, 2023 · 0 comments
Labels
bug 🐛 Something isn't working

Comments

@staltz
Copy link
Member

staltz commented Jan 17, 2023

Problem: reindexEncrypted will call index.processRecord(record, seq, pValue) for every freshly-decrypted box2 msg, but leveldb indexes may build state in such a way that assumes that all records are processed in order.

For instance, take the ssb-about-self index. Every time it stumbles upon an about message, it will destructively update the state of the user profile.

So if the "latest" user profile was published on the about message at sequence 10, if we just decrypted a box2 about message at sequence 6, this one will override the actual latest information from sequence 10.

@staltz staltz added the bug 🐛 Something isn't working label Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant