mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
Fix lock check
This commit is contained in:
parent
fc913649cf
commit
92eb6685c6
@ -218,7 +218,7 @@ ReplicatedMergeMutateTaskBase::PrepareResult MergeFromLogEntryTask::prepare()
|
||||
|
||||
zero_copy_lock = storage.tryCreateZeroCopyExclusiveLock(entry.new_part_name, disk);
|
||||
|
||||
if (!zero_copy_lock)
|
||||
if (!zero_copy_lock || !zero_copy_lock->isLocked())
|
||||
{
|
||||
LOG_DEBUG(log, "Merge of part {} started by some other replica, will wait it and fetch merged part", entry.new_part_name);
|
||||
/// Don't check for missing part -- it's missing because other replica still not
|
||||
|
@ -127,7 +127,7 @@ ReplicatedMergeMutateTaskBase::PrepareResult MutateFromLogEntryTask::prepare()
|
||||
|
||||
zero_copy_lock = storage.tryCreateZeroCopyExclusiveLock(entry.new_part_name, disk);
|
||||
|
||||
if (!zero_copy_lock)
|
||||
if (!zero_copy_lock || !zero_copy_lock->isLocked())
|
||||
{
|
||||
LOG_DEBUG(log, "Mutation of part {} started by some other replica, will wait it and mutated merged part", entry.new_part_name);
|
||||
return PrepareResult{
|
||||
|
Loading…
Reference in New Issue
Block a user