Minimum value of Cassandratombstone_threshold

Asked 2 years ago, Updated 2 years ago, 93 views

Could you please let me know the minimum value of Tombstone_threshold for Cassandra?
I'm troubled because I can't judge even by looking at the manual.Try until 0.01
I was able to confirm that it is valid.
By the way, in Cassandra 3.0, the compression strategy is DTCS.

Thank you for your cooperation.

cassandra

2022-09-30 21:48

1 Answers

tombstone_threshold is Java float, so you can theoretically set it to 2^-149.

https://github.com/apache/cassandra/blob/cassandra-3.0/src/java/org/apache/cassandra/db/compaction/AbstractCompactionStrategy.java#L107

In practice, tombstone_threshold compares the value of the statistics for the percentage of Tombstone in the SSTable to determine if the SSTable should perform a single compaction, as referenced in the following methods:

https://github.com/apache/cassandra/blob/cassandra-3.0/src/java/org/apache/cassandra/db/compaction/AbstractCompactionStrategy.java#L368

Cassandra will actually be able to delete Tombstones after the gc_grace_seconds time set in the table (default is 10 days).
Statistics Retrieved in the Code Above

sstable.getEstimatedDroppableTombstoneRatio(gcBefore);

calculates the percentage of Tombstone in the SSTable that is past gc_grace_seconds.

(By the way, DTCS is deprecated in Cassandra 3.0.8.Why don't you consider moving to TimeWindowCompactionStatey (TWCS)?

https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlHowDataMaintain.html


2022-09-30 21:48

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.