mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 00:30:49 +00:00
Merge pull request #58574 from ClickHouse/tavplubix-patch-10
Follow-up to #58482
This commit is contained in:
commit
ab82adfbea
@ -4006,9 +4006,13 @@ MergeTreeData::PartsToRemoveFromZooKeeper MergeTreeData::removePartsInRangeFromW
|
||||
/// We don't need to commit it to zk, and don't even need to activate it.
|
||||
|
||||
MergeTreePartInfo empty_info = drop_range;
|
||||
empty_info.min_block = empty_info.level = empty_info.mutation = 0;
|
||||
empty_info.level = empty_info.mutation = 0;
|
||||
empty_info.min_block = MergeTreePartInfo::MAX_BLOCK_NUMBER;
|
||||
for (const auto & part : parts_to_remove)
|
||||
{
|
||||
/// We still have to take min_block into account to avoid creating multiple covering ranges
|
||||
/// that intersect each other
|
||||
empty_info.min_block = std::min(empty_info.min_block, part->info.min_block);
|
||||
empty_info.level = std::max(empty_info.level, part->info.level);
|
||||
empty_info.mutation = std::max(empty_info.mutation, part->info.mutation);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user