mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-02 04:56:58 +00:00
Leveled compaction strategy is doing a lot of work whenever it's asked to get a list of sstables to be compacted. It's checking if a sstable overlaps with another sstable in the same level twice. First, when adding a sstable to a list with sstables at the same level. Second, after adding all sstables to their respective lists. It's enough to check that a sstable creates an overlap in its level only once. So I am changing the code to unconditionally insert a sstable to its respective list, and after that, it will call repair_overlapping_sstables() that will send any sstable that creates an overlap in its level to L0 list. By the way, the optimization isn't in the compaction itself, instead in the strategy code that gets a set of sstables to be compacted. Reviewed-by: Nadav Har'El <nyh@scylladb.com> Signed-off-by: Raphael S. Carvalho <raphaelsc@scylladb.com> Message-Id: <8c8526737277cb47987a3a5dbd5ff3bb81a6d038.1461965074.git.raphaelsc@scylladb.com>