SHOULD work but it doesn't. The reason is that plugin.reset() only sets offset to -1 after leveldb.clear(), but it should do that before. Otherwise, updateIndexes will see that this index is already "caught up" with the latest log.since.value.
By the way, log.since.value is NOT reset after compaction and it seems it really should be!
Replacing
https://github.com/ssbc/ssb-db2/blob/f976aac9a4bd4ee804b9f4cd24511dec52cb5d9d/test/compaction.js#L203
with
SHOULD work but it doesn't. The reason is that
plugin.reset()
only setsoffset
to -1 after leveldb.clear(), but it should do that before. Otherwise,updateIndexes
will see that this index is already "caught up" with the latest log.since.value.By the way,
log.since.value
is NOT reset after compaction and it seems it really should be!