开发者

Major compaction in cassandra

开发者 https://www.devze.com 2023-04-10 05:21 出处:网络
I have a 4 node brisk cluster with 2 Cassandra nodes in Cassandra DC and 2 brisk nodes in Brisk DC. I stress tested this set up using stress tool which is being shipped along with cassandra for 10 Mil

I have a 4 node brisk cluster with 2 Cassandra nodes in Cassandra DC and 2 brisk nodes in Brisk DC. I stress tested this set up using stress tool which is being shipped along with cassandra for 10 Million writes

On executing

$ ./nodetool -h x.x.x.x compactionstats

pending tasks: 17
          compaction type        keyspace   column family bytes compacted     bytes total  progress
                    Major       Keyspace1       Standard1        45172473        60278166    74.94%

AFAIK major compaction is manually triggered from node tool. But I'm able to see that it has been 开发者_C百科triggered automatically. Is this a desired behavior? If so what are all the situations this may occur?

Regards, Tamil


From the doc:

Compactions are triggered when at least N SStables have been flushed to disk, where N is tunable and defaults to 4.

"Minor" compactions merge sstables of similar size; "major" compactions merge all sstables in a given ColumnFamily.

Again from the doc:

A major compaction is triggered either via nodeprobe, or automatically:

Nodeprobe sends TreeRequest messages to all neighbors of the target node: when a node receives a TreeRequest, it will perform a readonly compaction to immediately validate the column family.

Automatic compactions will also validate a column family and broadcast TreeResponses, but since TreeRequest messages are not sent to neighboring nodes, repairs will only occur if two nodes happen to perform automatic compactions within TREE_STORE_TIMEOUT of one another.

You may find more info here and here

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号