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

RangeTombstones not merging during compaction

    XMLWordPrintableJSON

Details

    • Critical

    Description

      When performing a compaction on two sstables that contain the same RangeTombstone with different timestamps, the tombstones are not merged in the new sstable.

      This has been tested using cassandra 2.1 with the following table:

      CREATE TABLE test(
        key text,
        column text,
        data text,
        PRIMARY KEY(key, column)
      );
      

      And then doing the following:

      INSERT INTO test (key, column, data) VALUES ("1", "1", "1"); // If the sstable only contains tombstones during compaction it seems that the sstable either gets removed or isn't created (but that could probably be a separate JIRA issue).
      INSERT INTO test (key, column, data) VALUES ("1", "2", "2"); // The inserts are not actually needed, since the deletes create tombstones either way.
      DELETE FROM test WHERE key="1" AND column="2";
      
      nodetool flush
      
      INSERT INTO test (key, column, data) VALUES ("1", "2", "2");
      DELETE FROM test WHERE key="1" AND column="2";
      
      nodetool flush
      nodetool compact
      

      When checking with the SSTableExport tool two tombstones exists in the compacted sstable. This can be repeated, resulting in more and more tombstones.

      Attachments

        1. 0001-7953-v2.patch
          5 kB
          Marcus Eriksson
        2. CASSANDRA-7953.patch
          5 kB
          Marcus Olsson
        3. CASSANDRA-7953-1.patch
          5 kB
          Marcus Olsson

        Issue Links

          Activity

            People

              blambov Branimir Lambov
              molsson Marcus Olsson
              Branimir Lambov
              Marcus Eriksson
              Votes:
              7 Vote for this issue
              Watchers:
              21 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: