From 4c8607155f4ef3e6e16a375384b76a5dd2b6efa4 Mon Sep 17 00:00:00 2001 From: Alexander Tokmakov Date: Thu, 12 Dec 2024 15:59:42 +0100 Subject: [PATCH] Update StorageReplicatedMergeTree.cpp --- src/Storages/StorageReplicatedMergeTree.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Storages/StorageReplicatedMergeTree.cpp b/src/Storages/StorageReplicatedMergeTree.cpp index 5f97f2693ee..aab08d35d49 100644 --- a/src/Storages/StorageReplicatedMergeTree.cpp +++ b/src/Storages/StorageReplicatedMergeTree.cpp @@ -8334,6 +8334,9 @@ void StorageReplicatedMergeTree::replacePartitionFrom( } LOG_INFO(log, "Will try to attach {} partitions", partitions.size()); + if (partitions.empty()) + return; + const Stopwatch watch; ProfileEventsScope profile_events_scope; const auto zookeeper = getZooKeeper();