提交 769257ac 编写于 作者: A Alexander Tokmakov

fix drop table on cluster hang

上级 4be33e81
......@@ -727,9 +727,15 @@ void DDLWorker::processTask(DDLTask & task)
}
if (storage && taskShouldBeExecutedOnLeader(rewritten_ast, storage) && !task.is_circular_replicated)
{
tryExecuteQueryOnLeaderReplica(task, storage, rewritten_query, task.entry_path, zookeeper);
}
else
{
/// StoragePtr may cause DROP TABLE to hang
storage.reset();
tryExecuteQuery(rewritten_query, task, task.execution_status);
}
}
else
tryExecuteQuery(rewritten_query, task, task.execution_status);
......
localhost 9000 0 0 0
localhost 9000 0 0 0
localhost 9000 0 0 0
localhost 9000 0 0 0
localhost 9000 0 0 0
DROP TABLE IF EXISTS test_repl ON CLUSTER test_shard_localhost SYNC;
CREATE TABLE test_repl ON CLUSTER test_shard_localhost (n UInt64) ENGINE ReplicatedMergeTree('/clickhouse/test_01181/{database}/test_repl','r1') ORDER BY tuple();
DETACH TABLE test_repl ON CLUSTER test_shard_localhost SYNC;
ATTACH TABLE test_repl ON CLUSTER test_shard_localhost;
DROP TABLE test_repl ON CLUSTER test_shard_localhost SYNC;
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册