Update src/Storages/MergeTree/MergeFromLogEntryTask.cpp

Co-authored-by: Alexander Tokmakov <tavplubix@clickhouse.com>
This commit is contained in:
alesapin 2022-09-16 11:50:07 +02:00 committed by GitHub
parent be81d653e1
commit af259a2a68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -223,7 +223,7 @@ ReplicatedMergeMutateTaskBase::PrepareResult MergeFromLogEntryTask::prepare()
.part_log_writer = {}
};
}
else if (!storage.findReplicaHavingCoveringPart(entry.new_part_name, true, dummy).empty())
else if (!storage.findReplicaHavingCoveringPart(entry.new_part_name, /* active */ false, dummy).empty())
{
/// Why this if still needed? We can check for part in zookeeper, don't find it and sleep for any amount of time. During this sleep part will be actually committed from other replica
/// and exclusive zero copy lock will be released. We will take the lock and execute merge one more time, while it was possible just to download the part from other replica.