Remove dynamic cast from check

This commit is contained in:
alesapin 2020-03-31 22:33:37 +03:00
parent c424db85b4
commit 2b235f1b1a

View File

@ -3336,7 +3336,7 @@ void StorageReplicatedMergeTree::alter(
} }
else if (rc == Coordination::ZBADVERSION) else if (rc == Coordination::ZBADVERSION)
{ {
if (dynamic_cast<const Coordination::SetResponse &>(*results[0]).error) if (results[0]->error)
throw Exception("Metadata on replica is not up to date with common metadata in Zookeeper. Cannot alter", ErrorCodes::CANNOT_ASSIGN_ALTER); throw Exception("Metadata on replica is not up to date with common metadata in Zookeeper. Cannot alter", ErrorCodes::CANNOT_ASSIGN_ALTER);
continue; continue;