Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-15761

Make SASI query safe for concurrent compaction

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Normal
    • Resolution: Unresolved
    • 3.11.x, 5.x
    • Feature/SASI
    • 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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jasonstack Zhao Yang
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: