Merge pull request #29237 from CurtizJ/better-logging

Better diagnostic in ReplicatedMergeTree
This commit is contained in:
alesapin 2021-09-22 13:45:10 +03:00 committed by GitHub
commit 258ce2436a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -961,7 +961,9 @@ void StorageReplicatedMergeTree::checkTableStructure(const String & zookeeper_pr
const ColumnsDescription & old_columns = metadata_snapshot->getColumns();
if (columns_from_zk != old_columns)
{
throw Exception("Table columns structure in ZooKeeper is different from local table structure", ErrorCodes::INCOMPATIBLE_COLUMNS);
throw Exception(ErrorCodes::INCOMPATIBLE_COLUMNS,
"Table columns structure in ZooKeeper is different from local table structure. Local columns:\n"
"{}\nZookeeper columns:\n{}", old_columns.toString(), columns_from_zk.toString());
}
}