Sylvain Lebresne created CASSANDRA-5248:
-------------------------------------------

             Summary: Fix timestamp-based tomstone removal logic
                 Key: CASSANDRA-5248
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-5248
             Project: Cassandra
          Issue Type: Bug
    Affects Versions: 1.2.1
            Reporter: Sylvain Lebresne
            Assignee: Sylvain Lebresne
             Fix For: 1.2.2


Quoting the description of CASSANDRA-4671:
{quote}
In other words, we should force CompactionController.shouldPurge() to return 
true if min_timestamp(non-compacted-overlapping-sstables) > 
max_timestamp(compacted-sstables)
{quote}
but somehow this was translating in the code to:
{noformat}
if (sstable.getBloomFilter().isPresent(key.key) && sstable.getMinTimestamp() >= 
maxDeletionTimestamp)
    return false;
{noformat}
which, well, is reversed.

Attaching the trivial patch to fix. I note that we already had a test that 
catched this (CompactionsTest.testDontPurgeAccidentaly), but that test was racy 
in that most of the time the compaction was done in the same second than the 
removal done prior to that and thus the compaction wasn't considering the 
tombstone gcable even though gcgrace was 0. I've already pushed the addition of 
a 1 second delay to make sure the patch reliably catch this bug.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to