eventstore/mmm: defrag.

This commit is contained in:
fiatjaf
2026-06-15 14:23:54 -03:00
parent 0616b30ab3
commit 0f8843afac
8 changed files with 471 additions and 6 deletions
+5
View File
@@ -142,6 +142,11 @@ func FuzzTest(f *testing.F) {
mmmm.Rescan()
}
// perform random defrags -- shouldn't break the database
if rnd.UintN(3) == 1 {
mmmm.Defragment(len(deleted) / 3)
}
for id, deletedlayers := range deleted {
evt, foundlayers := mmmm.GetByID(id)