mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
Merge branch 'better_remove_empty_parts' into fix_drop_part_in_queue
the commit.
This commit is contained in:
commit
1072be7009
@ -7494,7 +7494,15 @@ bool StorageReplicatedMergeTree::createEmptyPartInsteadOfLost(zkutil::ZooKeeperP
|
|||||||
for (const auto & part : replaced_parts)
|
for (const auto & part : replaced_parts)
|
||||||
part_names.emplace_back(part->name);
|
part_names.emplace_back(part->name);
|
||||||
|
|
||||||
throw Exception(ErrorCodes::LOGICAL_ERROR, "Tried to create empty part {}, but it replaces existing parts {}.", lost_part_name, fmt::join(part_names, ", "));
|
/// Why this exception is not a LOGICAL_ERROR? Because it's possible
|
||||||
|
/// to have some source parts for the lost part if replica currently
|
||||||
|
/// cloning from another replica, but source replica lost covering
|
||||||
|
/// part and finished MERGE_PARTS before clone. It's an extremely
|
||||||
|
/// rare case and it's unclear how to resolve it better. Eventually
|
||||||
|
/// source replica will replace lost part with empty part and we
|
||||||
|
/// will fetch this empty part instead of our source parts. This
|
||||||
|
/// will make replicas consistent, but some data will be lost.
|
||||||
|
throw Exception(ErrorCodes::INCORRECT_DATA, "Tried to create empty part {}, but it replaces existing parts {}.", lost_part_name, fmt::join(part_names, ", "));
|
||||||
}
|
}
|
||||||
|
|
||||||
while (true)
|
while (true)
|
||||||
|
Loading…
Reference in New Issue
Block a user