4

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?

Community
  • 1
  • 1
odiszapc
  • 4,089
  • 2
  • 27
  • 42

2 Answers2

5

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.

akawaguc
  • 391
  • 3
  • 4
3

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.

jbellis
  • 19,347
  • 2
  • 38
  • 47
  • Might be worth updating the post since Cassandra has major compaction for LCS since 2.2.x (or something close to that). :) – Pedro Gordo Apr 14 '19 at 19:40