Sean Thornton created CASSANDRA-10976:
-----------------------------------------

             Summary: Improve Tombstone Compaction to respect Partitioner
                 Key: CASSANDRA-10976
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-10976
             Project: Cassandra
          Issue Type: Improvement
          Components: Compaction
            Reporter: Sean Thornton


It would be nice to have AbstractCompactionStrategy.worthDroppingTombstones 
changed to use the partitioner to help decide when to compact.  It appears that 
back in CASSANDRA-6563, unchecked_tombstone_compaction was added to try and 
address this but it is turned off by default.

The problem I have with this method is it was built when OrderedPartitioner was 
more the norm (vs. Random/Murmur today) and the checks it performs are still 
based on that assumption.

So my thought would be to update worthDroppingTombstones to get rid of 
unchecked_tombstone_compaction and do something like the following pseudo -
{code}
// do the early escape checks...
if (ssTableTooNew) return false;
if (droppableRatio <= tombstoneThreshold) return false;

// use the partitioner to try to be smart about it
if (sstable.partitioner.preservesOrder()) {
    // do the range/overlap checks done today and return...
} else {
    return true;
}
{code}

Found in 2.0.14 but looking around seems to be present in newer branches as 
well.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to