mmm: stop truncating mmap, reorder commits and write operations such that eventual inconsistencies are minimized and less harmful.

This commit is contained in:
fiatjaf
2025-10-16 02:26:07 +00:00
parent 98cbe66e16
commit fc16a36481
15 changed files with 278 additions and 236 deletions
-2
View File
@@ -14,7 +14,6 @@ type query struct {
i int
dbi lmdb.DBI
prefix []byte
results chan *nostr.Event
keySize int
timestampSize int
startingPoint []byte
@@ -46,7 +45,6 @@ func (il *IndexingLayer) prepareQueries(filter nostr.Filter) (
sp = sp[0:len(q.prefix)]
copy(sp, q.prefix)
queries[i].startingPoint = binary.BigEndian.AppendUint32(sp, uint32(until))
queries[i].results = make(chan *nostr.Event, 12)
}
}()