mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-25 02:50:33 +00:00
This patch adds the basic compaction function sstables::compact_sstables, which takes a list of input sstables, and creates several (currently one) merged sstable. This implementation is pretty simple once we have all the infrastructure in place (combining reader, writer, and a pipe between them to reduce context switches). This is already working compaction, but not quite complete: We'll need to add compaction strategies (which sstables to compact, and when), better cardinality estimator, sstable management and renaming, and a lot of other details, and we'll probably still need to change the API. But we can already write a test for compacting existing sstables (see the next patch), and I wanted to get this patch out of the way, so we can start working on applying compaction in a real use case. Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>