From fb765696b6629e1c1c4f76d4c0237058fa7a6588 Mon Sep 17 00:00:00 2001 From: Smita Kulkarni Date: Tue, 7 Feb 2023 12:19:58 +0100 Subject: [PATCH] Removed state_mutex lock from addSubscriber - Updated checking of SYSTEM SYNC REPLICA --- src/Storages/MergeTree/ReplicatedMergeTreeQueue.cpp | 1 - src/Storages/StorageReplicatedMergeTree.cpp | 1 - 2 files changed, 2 deletions(-) diff --git a/src/Storages/MergeTree/ReplicatedMergeTreeQueue.cpp b/src/Storages/MergeTree/ReplicatedMergeTreeQueue.cpp index 5ec95b61faa..78276b7986f 100644 --- a/src/Storages/MergeTree/ReplicatedMergeTreeQueue.cpp +++ b/src/Storages/MergeTree/ReplicatedMergeTreeQueue.cpp @@ -2478,7 +2478,6 @@ String ReplicatedMergeTreeMergePredicate::getCoveringVirtualPart(const String & ReplicatedMergeTreeQueue::SubscriberHandler ReplicatedMergeTreeQueue::addSubscriber(ReplicatedMergeTreeQueue::SubscriberCallBack && callback) { - std::lock_guard lock(state_mutex); std::lock_guard lock_subscribers(subscribers_mutex); auto it = subscribers.emplace(subscribers.end(), std::move(callback)); diff --git a/src/Storages/StorageReplicatedMergeTree.cpp b/src/Storages/StorageReplicatedMergeTree.cpp index 1c0541a52b5..5037734f21d 100644 --- a/src/Storages/StorageReplicatedMergeTree.cpp +++ b/src/Storages/StorageReplicatedMergeTree.cpp @@ -7587,7 +7587,6 @@ bool StorageReplicatedMergeTree::waitForProcessingQueue(UInt64 max_wait_millisec if (partial_shutdown_called) throw Exception(ErrorCodes::ABORTED, "Shutdown is called for table"); } - return true; }