Files
scylladb/compaction
Kefu Chai 4c1a26c99f compaction_manager: sort sstables when compaction is enabled
before this change, we sort sstables with compaction disabled, when we
are about to perform the compaction. but the idea of of guarding the
getting and registering as a transaction is to prevent other compaction
to mutate the sstables' state and cause the inconsistency.

but since the state is tracked on per-sstable basis, and is not related
to the order in which they are processed by a certain compaction task.
we don't need to guard the "sort()" with this mutual exclusive lock.

for better readability, and probably better performance, let's move the
sort out of the lock. and take this opportunity to use
`std::ranges::sort()` for more concise code.

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>

Closes #14699
2023-07-18 06:40:43 +03:00
..