Details
-
Bug
-
Status: Open
-
Normal
-
Resolution: Unresolved
-
None
-
Correctness - Recoverable Corruption / Loss
-
Critical
-
Normal
-
Unit Test
-
All
-
None
Description
Read Request Thread:
1.) In QueryController#getIndexes, read request gets the current view of sstable indexes.
2.) Request will try to reference the SSTableIndex from the view in TermIterator#build and skips the SSTableIndex if it cannot be referenced.
Compaction Thread:
If a compaction finishes between 1) and 2) and no other in-flight queries are holding the sstable index reference, compacted SSTableIndex will be released.
Then in step 2, read request will not be able to reference the released SSTableIndex. We won't see a corruption error, but we'll silently not read all data.
Proposed fix: Read Request should make sure all SSTableIndexes from the View can be referenced; if not, it should retry with latest View.