mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-26 11:30:36 +00:00
As the name implies, this patch introduces the concept of automatic compaction for sstables. Compaction task is triggered whenever a new sstable is written. Concurrent compaction on the same column family isn't supported, so compaction may be postponed if there is an ongoing compression. In addition, seastar::gate is used both to prevent a new compaction from starting and to wait for an ongoing compaction to finish, when the system is asked for a shutdown. This patch also introduces an abstract class for compaction strategy, which is really useful for supporting multiple strategies. Currently, null and major compaction strategies are supported. As the name implies, null compaction strategy does nothing. Major compaction strategy is about compacting all sstables into one. This strategy may end up being helpful when adding support to major compaction via nodetool. Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>