Merge pull request #32119 from ClickHouse/tavplubix-patch-4

Fix data race in `removePartAndEnqueueFetch(...)`
This commit is contained in:
tavplubix 2021-12-02 15:25:38 +03:00 committed by GitHub
commit 1f4b14f68b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3339,7 +3339,7 @@ void StorageReplicatedMergeTree::removePartAndEnqueueFetch(const String & part_n
/// It's quite dangerous, so clone covered parts to detached.
auto broken_part_info = MergeTreePartInfo::fromPartName(part_name, format_version);
auto partition_range = getDataPartsPartitionRange(broken_part_info.partition_id);
auto partition_range = getDataPartsVectorInPartition(MergeTreeDataPartState::Committed, broken_part_info.partition_id);
for (const auto & part : partition_range)
{
if (!broken_part_info.contains(part->info))