You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Sylvain Lebresne (JIRA)" <ji...@apache.org> on 2013/02/13 12:06:12 UTC

[jira] [Updated] (CASSANDRA-5248) Fix timestamp-based tomstone removal logic

     [ https://issues.apache.org/jira/browse/CASSANDRA-5248?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sylvain Lebresne updated CASSANDRA-5248:
----------------------------------------

    Attachment: 5248.txt
    
> 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
>
>         Attachments: 5248.txt
>
>
> 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