mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-01 12:36:56 +00:00
This short series prevents the creation of compaction tasks when we know in advance that they have nothing to do. This is possible in the clean path by: - improve the detection of candidates for cleanup by skipping sstables that require cleanup but are already being compacted - checking that list of sstables selected for cleanup isn't empty before creating the cleanup task For upgrade sstables, and generally when rewriting all sstable: launch the task only if the list off candidate sstables isn't empty. For regular compaction, when triggered via `table::add_sstable_and_update_cache`, we currently trigger compaction (by calling `submit`) on all compaction groups while the sstable is added only to one of them. Also, it is typically called for maintenance sstables that are awaiting offstrategy compaction, in which case we can skip calling `submit` entirely since the caller triggers offstrategy compaction at a later stage. Refs scylladb/scylladb#15673 Refs scylladb/scylladb#16694 Fixes scylladb/scylladb#16803 Closes scylladb/scylladb#16808 * github.com:scylladb/scylladb: table: add_sstable_and_update_cache: trigger compaction only in compaction group compaction_manager: perform_task_on_all_files: return early when there are no sstables to compact compaction_manager: perform_cleanup: use compaction_manager::eligible_for_compaction