mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-04 21:42:39 +00:00
fix
This commit is contained in:
parent
67f0a0e3e4
commit
9f849fbe06
@ -1186,7 +1186,10 @@ void DatabaseReplicated::dropReplica(
|
||||
|
||||
auto zookeeper = Context::getGlobalContextInstance()->getZooKeeper();
|
||||
|
||||
String database_mark = zookeeper->get(database_zookeeper_path);
|
||||
String database_mark;
|
||||
bool db_path_exists = zookeeper->tryGet(database_zookeeper_path, database_mark);
|
||||
if (!db_path_exists && !throw_if_noop)
|
||||
return;
|
||||
if (database_mark != REPLICATED_DATABASE_MARK)
|
||||
throw Exception(ErrorCodes::BAD_ARGUMENTS, "Path {} does not look like a path of Replicated database", database_zookeeper_path);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user