diff --git a/src/Storages/MergeTree/MergeTreeBackgroundExecutor.h b/src/Storages/MergeTree/MergeTreeBackgroundExecutor.h index 1c640f8e6ec..5dffe7f5908 100644 --- a/src/Storages/MergeTree/MergeTreeBackgroundExecutor.h +++ b/src/Storages/MergeTree/MergeTreeBackgroundExecutor.h @@ -118,7 +118,10 @@ private: ExecutableTaskPtr task; CurrentMetrics::Increment increment; std::atomic_bool is_currently_deleting{false}; - Poco::Event is_done; + /// Actually autoreset=false is needed only for unit test + /// where multiple threads could remove tasks corresponding to the same storage + /// This scenario in not possible in reality. + Poco::Event is_done{/*autoreset=*/false}; }; using ItemPtr = std::shared_ptr;