mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-14 10:22:10 +00:00
Update StorageReplicatedMergeTree.cpp
This commit is contained in:
parent
3598f39f82
commit
854192e666
@ -2690,13 +2690,23 @@ std::unordered_map<String, String> StorageReplicatedMergeTree::getLastPartsWithQ
|
||||
|
||||
if (!last_parts_str.empty())
|
||||
{
|
||||
in >> "parts_count " >> count >> "\n";
|
||||
for (size_t i = 0; i < count; ++i)
|
||||
try
|
||||
{
|
||||
String partition_id;
|
||||
String part_name;
|
||||
in >> partition_id >> "\t" >> part_name >> "\n";
|
||||
last_blocks[partition_id] = part_name;
|
||||
in >> "parts_count " >> count >> "\n";
|
||||
for (size_t i = 0; i < count; ++i)
|
||||
{
|
||||
String partition_id;
|
||||
String part_name;
|
||||
in >> partition_id >> "\t" >> part_name >> "\n";
|
||||
last_blocks[partition_id] = part_name;
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
String last_part;
|
||||
in >> last_part;
|
||||
auto partition_info = MergeTreePartInfo::fromPartName(last_part, data.format_version);
|
||||
last_blocks[partition_info.partition_id] = last_part;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user