提交 483dfd1b 编写于 作者: V Vitaliy Lyudvichenko

Fixed "No part error" in replicated sender. [#CLICKHOUSE-3178]

上级 397b8bcf
......@@ -157,10 +157,13 @@ void Service::processQuery(const Poco::Net::HTMLForm & params, ReadBuffer & body
MergeTreeData::DataPartPtr Service::findPart(const String & name)
{
MergeTreeData::DataPartPtr part = data.getPartIfExists(name);
/// It is important to include PreCommitted parts here
/// Because part could be actually committed into ZooKeeper, but response from ZooKeeper to the server could be delayed
auto part = data.getPartIfExists(name, {MergeTreeDataPart::State::PreCommitted, MergeTreeDataPart::State::Committed});
if (part)
return part;
throw Exception("No part " + name + " in table");
throw Exception("No part " + name + " in table", ErrorCodes::NO_SUCH_DATA_PART);
}
MergeTreeData::DataPartPtr Service::findShardedPart(const String & name, size_t shard_no)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册