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

Race condition in sstable reference counting

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Urgent
    • Resolution: Fixed
    • 1.0.0
    • None
    • None
    • Critical

    Description

      DataTracker gives us an atomic View of memtable/sstables, but acquiring references is not atomic. So it is possible to acquire references to an SSTableReader object that is no longer valid, as in this example:

      View V contains sstables

      {A, B}

      . We attempt a read in thread T using this View.
      Meanwhile, A and B are compacted to

      {C}

      , yielding View W. No references exist to A or B so they are cleaned up.
      Back in thread T we acquire references to A and B. This does not cause an error, but it will when we attempt to read from them next.

      Attachments

        1. 3085.txt
          22 kB
          Jonathan Ellis
        2. 3085-v2.txt
          17 kB
          Jonathan Ellis

        Activity

          People

            jbellis Jonathan Ellis
            jbellis Jonathan Ellis
            Jonathan Ellis
            Sylvain Lebresne
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: