Fix drop partition in rare case

This commit is contained in:
Amos Bird 2021-05-20 14:55:28 +08:00
parent c1c6a0d8e3
commit 81dd60fdc2
No known key found for this signature in database
GPG Key ID: 80D430DCBECFEDB4

View File

@ -4902,7 +4902,9 @@ bool StorageReplicatedMergeTree::getFakePartCoveringAllPartsInPartition(const St
auto zookeeper = getZooKeeper();
delimiting_block_lock = allocateBlockNumber(partition_id, zookeeper);
right = delimiting_block_lock->getNumber();
mutation_version = queue.getCurrentMutationVersion(partition_id, right);
// Make sure we cover all parts in partition. In rare cases there might be parts with
// mutation version greater than current block number.
mutation_version = MergeTreePartInfo::MAX_BLOCK_NUMBER;
}
if (for_replace_range)