mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-29 11:10:40 +00:00
previously the logstor compaction state for a compaction group could be removed by a compaction reenabler guard. this caused an invalid access in stop_ongoing_compactions, because it holds an iterator to the compaction state across a yield point, so the iterator can be invalidated if erased by another source concurrently. we change the compaction state removal to be done only in a remove() function that is called when the compaction group is stopped, after waiting for ongoing compaction to stop and after the gates are closed. this is safer because we keep the compaction state while the compaction group exists, and remove it only when it's stopped and there are no compactions in progress. this is similar to compaction state removal for non-logstor tables in compaction_group::stop. Fixes SCYLLADB-2199 Closes scylladb/scylladb#30068