mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-14 10:22:10 +00:00
Check for "SYSTEM STOP MERGES" primarily for MERGE_PARTS/MUTATE_PART
Since after it will obtain part information (getPartIfExists()), that will try to acquire DataPartsLock. Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
This commit is contained in:
parent
bce6817fcc
commit
c1a44f887e
@ -1337,6 +1337,13 @@ bool ReplicatedMergeTreeQueue::shouldExecuteLogEntry(
|
||||
|
||||
if (entry.type == LogEntry::MERGE_PARTS || entry.type == LogEntry::MUTATE_PART)
|
||||
{
|
||||
if (merger_mutator.merges_blocker.isCancelled())
|
||||
{
|
||||
constexpr auto fmt_string = "Not executing log entry {} of type {} for part {} because merges and mutations are cancelled now.";
|
||||
LOG_DEBUG(LogToStr(out_postpone_reason, log), fmt_string, entry.znode_name, entry.typeToString(), entry.new_part_name);
|
||||
return false;
|
||||
}
|
||||
|
||||
/** If any of the required parts are now fetched or in merge process, wait for the end of this operation.
|
||||
* Otherwise, even if all the necessary parts for the merge are not present, you should try to make a merge.
|
||||
* If any parts are missing, instead of merge, there will be an attempt to download a part.
|
||||
@ -1371,12 +1378,6 @@ bool ReplicatedMergeTreeQueue::shouldExecuteLogEntry(
|
||||
}
|
||||
}
|
||||
}
|
||||
if (merger_mutator.merges_blocker.isCancelled())
|
||||
{
|
||||
constexpr auto fmt_string = "Not executing log entry {} of type {} for part {} because merges and mutations are cancelled now.";
|
||||
LOG_DEBUG(LogToStr(out_postpone_reason, log), fmt_string, entry.znode_name, entry.typeToString(), entry.new_part_name);
|
||||
return false;
|
||||
}
|
||||
|
||||
const auto data_settings = data.getSettings();
|
||||
if (data_settings->allow_remote_fs_zero_copy_replication)
|
||||
|
Loading…
Reference in New Issue
Block a user