提交 19de74d5 编写于 作者: A alesapin

Remove redundant lock

上级 2dca542d
...@@ -3272,8 +3272,7 @@ void StorageReplicatedMergeTree::alter( ...@@ -3272,8 +3272,7 @@ void StorageReplicatedMergeTree::alter(
std::vector<ChangedNode> changed_nodes; std::vector<ChangedNode> changed_nodes;
{ {
/// Guard races of alter thread metadata change /// We can safely read structure, because we guarded with alter_intention_lock
lockNewDataStructureExclusively(table_lock_holder, query_context.getCurrentQueryId());
if (is_readonly) if (is_readonly)
throw Exception("Can't ALTER readonly table", ErrorCodes::TABLE_IS_READ_ONLY); throw Exception("Can't ALTER readonly table", ErrorCodes::TABLE_IS_READ_ONLY);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册