mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-26 19:35:12 +00:00
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