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

ColumnStats min/max column names does not account for range thombstones, making deleted data resurrect at random

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Fix Version/s: 2.0.9
    • Component/s: None
    • Labels:
      None
    • Severity:
      Normal
    • Since Version:

      Description

      This issue can be reproduced in cqlsh:

      create table test1( a int, b int, primary key(a,b));
      INSERT INTO test1(a,b) values (1,1);
      INSERT INTO test1(a,b) values (1,2);
      INSERT INTO test1(a,b) values (1,3);
      INSERT INTO test1(a,b) values (1,4);
      INSERT INTO test1(a,b) values (1,5);
      INSERT INTO test1(a,b) values (1,6);
      -- flush memtable here
      delete from test1 where a=1 and b=6;
      INSERT INTO test1(a,b) values (2,2);
      -- flush memtable here
      
      select * from test1 where a=1 and b=6;
      
       a | b
      ---+---
       1 | 6
      
      

      Voila!

      The problem is in columnStats accounting for min and max columns names. range tombstones are not accounted there, so sstables get omitted on slice query read, if they have only range thombsones in some range.

      Also while debugged this found a problem in LazilyCompactedRow: RangeThombstones processing of timestamps histogram were implemented wrong in CASSANDRA-6522 - no range thobmstones are actuallu accessible in deletionInfo().rangeIterator(), so fixed it as well.

        Attachments

        1. ColumnStatsOfRangeThombstones.txt
          10 kB
          Oleg Anastasyev

          Activity

            People

            • Assignee:
              m0nstermind Oleg Anastasyev
              Reporter:
              m0nstermind Oleg Anastasyev
              Authors:
              Oleg Anastasyev
              Reviewers:
              Marcus Eriksson
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: