Vitalii Ishchenko created CASSANDRA-14944:
---------------------------------------------
Summary: Tombstones are not removed if bloom filter is turned off
Key: CASSANDRA-14944
URL: https://issues.apache.org/jira/browse/CASSANDRA-14944
Project: Cassandra
Issue Type: Bug
Components: Compaction
Reporter: Vitalii Ishchenko
Well actually they are deleted, but not always even though they should, because
check is done using Index of overlapped tables
When purge evaluator is constructed we are checking overlapping tables using
bloom filter, but when it is disabled we are checking against index, but if
condition is not properly constructed and we still check bloom filter which is
AlwaysPresentFilter and every overlapping sstable is used to get minTimestamp
and tombstones, that have their timestamp >= minTimestamp won't be deleted
{code:java}
if (sstable.getBloomFilter() instanceof AlwaysPresentFilter &&
sstable.getPosition(key, SSTableReader.Operator.EQ, false) != null
|| sstable.getBloomFilter().isPresent(key))
{
{code}
Should be something like this
{code:java}
boolean mightBePresentInTable = sstable.getBloomFilter() instanceof
AlwaysPresentFilter ? sstable.getPosition(key, SSTableReader.Operator.EQ,
false) != null : sstable.getBloomFilter().isPresent(key)
{code}
Code pointers in 3.11
[https://github.com/apache/cassandra/blob/08363afa5354c00a7ecd62fe273c392a678db28a/src/java/org/apache/cassandra/db/compaction/CompactionController.java#L274]
and 4.0
[https://github.com/apache/cassandra/blob/11384c3279a66e6c0fb7861e2b188b25e963580f/src/java/org/apache/cassandra/db/compaction/CompactionController.java#L281]
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]