fiatjaf on Nostr: Oh, now I see what you mean. I don't think that compact stuff is relevant here. The ...
Oh, now I see what you mean. I don't think that compact stuff is relevant here. The thing is that both on Badger and LMDB whenever we got a replaceable event stored twice (apparently because of race conditions) that would break the indexes in some way I forgot, such that it became impossible to delete the older version forever because it would be unreachable. The only way to fix this is to do a full rescan of the database and rebuild all the indexes, which is what LMDB does in its latest migration (well, all the other migrations I deleted because this big rescan makes them unnecessary).
Badger needs that same thing, but I forgot to do it. In any case you can do it manually by copying then nuking the database and then reimporting the events from the old database to the new empty one. I should still write the reindexing migration though.
Published at
2025-01-26 02:06:52Event JSON
{
"id": "00006fba94bc5e86998a50bb0685d26dca55898299cdc440cd8165cff81edb15",
"pubkey": "3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d",
"created_at": 1737857212,
"kind": 1,
"tags": [
[
"p",
"ee9d979e7e1418a9f7472baf82dc96082a0d4251b77bcb170a6ecec93fadff64"
],
[
"p",
"acbcec475a1a4f9481939ecfbd1c3d111f5b5a474a39ae039bbc720fdd305bec"
],
[
"p",
"0adf67475ccc5ca456fd3022e46f5d526eb0af6284bf85494c0dd7847f3e5033"
],
[
"p",
"e2ccf7cf20403f3f2a4a55b328f0de3be38558a7d5f33632fdaaefc726c1c8eb"
],
[
"e",
"cc2922d2b2026a9fad73ed5d304c7d9a2e53433c737baf2eda22dc7971b44708",
"wss://nostr.mom/",
"root"
],
[
"e",
"00005b91eb95e781d9cd240cfabd1be497bae0c8717b9eb262305afdf0235003",
"wss://nostr.mom/",
"reply",
"3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d"
],
[
"nonce",
"13835058055282180065",
"16"
]
],
"content": "Oh, now I see what you mean. I don't think that compact stuff is relevant here. The thing is that both on Badger and LMDB whenever we got a replaceable event stored twice (apparently because of race conditions) that would break the indexes in some way I forgot, such that it became impossible to delete the older version forever because it would be unreachable. The only way to fix this is to do a full rescan of the database and rebuild all the indexes, which is what LMDB does in its latest migration (well, all the other migrations I deleted because this big rescan makes them unnecessary).\n\nBadger needs that same thing, but I forgot to do it. In any case you can do it manually by copying then nuking the database and then reimporting the events from the old database to the new empty one. I should still write the reindexing migration though.",
"sig": "ce5048c374c693dc96699ce9c23db5dd5b69a6f6a9566b320a3ce6f3fd49750b3a6b0ae36796af241eccb439d547031faec597fd3b2db2f175a5c478a7879525"
}