0

During minor compaction, to reclaim a row tombstone, how cassandra is checking whether the row exists in other sstables? It just checks partition key by bloom filter or checks row key?

For example, there are 3 sstables: s1, s2 and s3. Assume s1 has the row key 'p.c1', where p is partition key and c1 is clustering key. s2 has the row key 'p.c2' and s3 has the tombstone for the row key 'p.c2'. In this case, when minor compaction is triggered on s2 and s3, the row 'p.c2' will be reclaimed after compaction?

Thanks a lot.

Erick Ramirez
  • 13,964
  • 1
  • 18
  • 23
  • Welcome to Stack Overflow! A friendly reminder that this site is for getting help with coding, algorithm, or programming language problems so I voted to have your post moved to [DBA Stack Exchange](https://dba.stackexchange.com/questions/ask?tags=cassandra). For future reference, you should post DB admin/ops questions on https://dba.stackexchange.com/questions/ask?tags=cassandra. Cheers! – Erick Ramirez Feb 07 '23 at 05:32

1 Answers1

0

Cassandra combines all the fragments of a partition from the active memtable and SSTables to determine if a tombstone can be dropped from an SSTable(s) being compacted.

Similar to read requests, Cassandra checks the memtable, bloom filter, partition key cache or partition summary, and the partition index to locate the fragments of the data/partition/row on disk.

For reference, have a look at How Cassandra reads data. Cheers!

Erick Ramirez
  • 13,964
  • 1
  • 18
  • 23