mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Merge pull request #11614 from ClickHouse/fixup-replica-create-drop
Fixup for recent replica CREATE/DROP changes.
This commit is contained in:
commit
37d7e9a60a
@ -564,8 +564,7 @@ void StorageReplicatedMergeTree::createReplica()
|
||||
Coordination::Stat replicas_stat;
|
||||
String replicas_value;
|
||||
|
||||
code = zookeeper->tryGet(zookeeper_path + "/replicas", replicas_value, &replicas_stat);
|
||||
if (code == Coordination::ZNONODE)
|
||||
if (!zookeeper->tryGet(zookeeper_path + "/replicas", replicas_value, &replicas_stat))
|
||||
throw Exception(fmt::format("Cannot create a replica of the table {}, because the last replica of the table was dropped right now",
|
||||
zookeeper_path), ErrorCodes::ALL_REPLICAS_LOST);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user