change exception

This commit is contained in:
Vadim 2018-08-22 17:25:30 +03:00 committed by GitHub
parent 623c6e0553
commit 62b9b039cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1996,7 +1996,7 @@ void StorageReplicatedMergeTree::cloneReplica(const String & source_replica, zku
if (error == ZooKeeperImpl::ZooKeeper::ZBADVERSION)
throw Exception("Can not clone replica, because a source replica is lost", ErrorCodes::SOURCE_REPLICA_IS_LOST);
else if (error == ZooKeeperImpl::ZooKeeper::ZNODEEXISTS)
throw Exception("Replica changed version");
throw Exception("ClickHouse server updated to new version", ErrorCodes::UPDATE_CH);
else if (error != ZooKeeperImpl::ZooKeeper::ZOK)
throw ("cloneReplica() failed");