From d4fb75c8db35d739df48a755fab897ed55194012 Mon Sep 17 00:00:00 2001 From: Alexander Tokmakov Date: Tue, 16 Aug 2022 12:49:17 +0200 Subject: [PATCH] Revert "fix race with check thread" This reverts commit 45284108bac920899b235b52ed8108cb08ee74a8. --- .../MergeTree/ReplicatedMergeTreeRestartingThread.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Storages/MergeTree/ReplicatedMergeTreeRestartingThread.cpp b/src/Storages/MergeTree/ReplicatedMergeTreeRestartingThread.cpp index dfb5eb0bd69..11f668bafbe 100644 --- a/src/Storages/MergeTree/ReplicatedMergeTreeRestartingThread.cpp +++ b/src/Storages/MergeTree/ReplicatedMergeTreeRestartingThread.cpp @@ -151,13 +151,13 @@ bool ReplicatedMergeTreeRestartingThread::runImpl() setNotReadonly(); /// Start queue processing - storage.part_check_thread.start(); storage.background_operations_assignee.start(); storage.queue_updating_task->activateAndSchedule(); storage.mutations_updating_task->activateAndSchedule(); storage.mutations_finalizing_task->activateAndSchedule(); storage.merge_selecting_task->activateAndSchedule(); storage.cleanup_thread.start(); + storage.part_check_thread.start(); return true; } @@ -356,6 +356,7 @@ void ReplicatedMergeTreeRestartingThread::partialShutdown(bool part_of_full_shut storage.mutations_finalizing_task->deactivate(); storage.cleanup_thread.stop(); + storage.part_check_thread.stop(); /// Stop queue processing { @@ -365,9 +366,6 @@ void ReplicatedMergeTreeRestartingThread::partialShutdown(bool part_of_full_shut storage.background_operations_assignee.finish(); } - /// Stop part_check_thread after queue processing, because some queue tasks may restart part_check_thread - storage.part_check_thread.stop(); - LOG_TRACE(log, "Threads finished"); }