Skip to content

Commit

Permalink
Merge pull request #58581 from ClickHouse/cherrypick/23.12/ab82adfbea…
Browse files Browse the repository at this point in the history
…b32b13d50ca6cc857a514df6acc62e

Cherry pick #58574 to 23.12: Follow-up to #58482
  • Loading branch information
robot-ch-test-poll2 committed Jan 7, 2024
2 parents 23d750b + ab82adf commit 7413870
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Storages/MergeTree/MergeTreeData.cpp
Expand Up @@ -4002,9 +4002,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);
}
Expand Down

0 comments on commit 7413870

Please sign in to comment.