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.
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_trackersand only call it onwipe, while keepingLmdb::wipe_indexesstrictly 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.