Dinesh
Dinesh

Reputation: 124

Can we do a major compaction before flushing a keyspace/table?

I know compaction merges SSTables, but what if I don't flush the keyspace/table before performing a major compaction? In this case, how a compaction works?

Upvotes: 1

Views: 49

Answers (1)

nevsv
nevsv

Reputation: 2466

Compaction works on all levels, and major compaction executed differently, based on your compaction strategy.

In STCS for example, you will have 2 sstables after the process - one with all the data from beggining of the process, and second one with data written on the tine of the process.

Here's article about it: http://docs.datastax.com/en/cassandra/3.0/cassandra/dml/dmlHowDataMaintain.html#dmlHowDataMaintain__dml-compaction

Upvotes: 1

Related Questions