Skip to content

lmdb: NostrLmdb::reindex is dangerous #1475

Description

@TheAwiteb

So, it sounds helpful, like it just "reindexes" the database, but in fact, it also deletes trackers, like deleted events and vanished users. Because of this, the database will accept them again when it shouldn't.

Deleting trackers makes sense when wiping the database, but not when reindexing it. I think we should have something like Lmdb::wipe_trackers and only call it on wipe, while keeping Lmdb::wipe_indexes strictly for indexes, the things that can actually be reindexed.

I'm not sure if this is a bug or not, so just leave it as an idea.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions