Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cassandra major compaction for leveled compaction column family

Tags:

cassandra

What happens when I perform a Major compaction on a column family with the Leveled compaction configured with nodetool compact ?

Documentation says:

compact [keyspace][cf_name]

For column families that use the SizeTieredCompactionStrategy, initiates an immediate major compaction of all column families in keyspace. For each column family in keyspace, this compacts all existing SSTables into a single SSTable. This can cause considerable disk I/O and can temporarily cause up to twice as much disk space to be used. Optionally takes a list of column family names.

This one is related to Tiered compaction. What about Leveled?

like image 572
odiszapc Avatar asked Oct 23 '25 04:10

odiszapc


2 Answers

Major compaction for LCS has been introduced since Cassandra 2.2 with the following JIRA ticket: https://issues.apache.org/jira/browse/CASSANDRA-7272

But I have never tested it and the manual of nodetool compact from DataStax doesn't describe LCS as of now so I'm not sure if it is actually useful or not.

like image 95
akawaguc Avatar answered Oct 25 '25 00:10

akawaguc


There is no such thing as a major compaction for LCS. nodetool compact will invoke the next minor compaction and is thus only useful if you've disabled automatic compaction for increased manual control.

like image 30
jbellis Avatar answered Oct 25 '25 00:10

jbellis



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!