Details
-
Bug
-
Resolution: Won't Fix
-
Major
-
None
-
Untriaged
-
0
-
Unknown
Description
Our generation of deltas from keyIndex compactions is not atomic with the fact if the compaction failed/succeeded. For example, if we drop all items through keyindex compactions, but final step of compaction fails. Even though the compaction has failed and hence all items are still valid in keyIndex, we still go ahead and generate deltas into seqIndex.
Any further look ups will then fail in seqIndex.
Wrote a unit test to demonstrate this: https://review.couchbase.org/c/magma/+/191603 (SeqIteratorTest/partial_compaction)
This may not be a problem today as KV's use cases of dropping items from keyindex via compaction callback are still safe.
- Collection drops are logically marked as done by KV irrespective of if the compaction succeeds/fails. They keep retrying it.
- Even if tombstones are dropped from keyIndex, it is ok to stream them from the seqIndex.