提交 16dad209 编写于 作者: V Vitaliy Lyudvichenko

Do not make extra ZK RTTs in inserts. [#CLICKHOUSE-3]

Resolves #2054
上级 6a965bb7
......@@ -108,6 +108,12 @@ public:
ops.emplace_back(std::make_shared<zkutil::Op::Remove>(holder_path, -1));
}
/// Do not delete nodes in destructor
void setIsUnlocked()
{
holder_path = "";
}
void checkCreated() const
{
if (!isCreated())
......
......@@ -370,6 +370,9 @@ void ReplicatedMergeTreeBlockOutputStream::commitPart(zkutil::ZooKeeperPtr & zoo
{
transaction.commit();
storage.merge_selecting_event.set();
/// Lock nodes have been already deleted, do not delete them in destructor
block_number_lock.setIsUnlocked();
}
else if (zkutil::isUserError(info.code))
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册