mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-25 11:00:35 +00:00
This is a reapplication of a former commit4affa801a5which was reverted by8e8dc2c930. This commit is a fixed version of the original where a call to the compaction_manager constructor accidentally issued (`compaction_manager()`) instead a call to retrieve a compaction manager reference (`get_compaction_manager()`), we don't use this function because it doesn't exist anymore - it existed at the time the patch was written bu was removed in9066224cf4later on, instead, we just use the private table member _compaction_manager which refs the compaction manager. The explanation for the bad effect is probably that a `this` pointer capture down the call chain, resulted in a use after free which had an unknown effect on the system. (memory corruption at startup). Test: unit (dev,debug) write performance test as the one used to find the bug. A screenshot of the performance test can be found at https://github.com/scylladb/scylla/issues/10146/#issuecomment-1129578381 Fixes #9313 Refs #10146 For completeness, the original commit message was: The api call disables new regular compaction jobs from starting but it doesn't wait for ongoing compaction to stop and so it's much less useful. Returning after stopping regular compaction jobs and waiting for them to stop guarantees that no regular compactions job are running when nodetool disableautocompaction returns successfully. Signed-off-by: Eliran Sinvani <eliransin@scylladb.com>