diff --git a/src/Storages/MergeTree/ReplicatedMergeTreeQueue.cpp b/src/Storages/MergeTree/ReplicatedMergeTreeQueue.cpp index ebd34474066..9f679f121b8 100644 --- a/src/Storages/MergeTree/ReplicatedMergeTreeQueue.cpp +++ b/src/Storages/MergeTree/ReplicatedMergeTreeQueue.cpp @@ -1256,27 +1256,6 @@ bool ReplicatedMergeTreeQueue::shouldExecuteLogEntry( { ignore_max_size = max_source_parts_size == data_settings->max_bytes_to_merge_at_max_space_in_pool; - if (data_settings->always_fetch_merged_part && entry.num_tries > 0) - { - static constexpr auto MAX_SECONDS_TO_WAIT = 300L; - static constexpr auto BACKOFF_SECONDS = 3; - - auto time_to_wait_seconds = std::min(MAX_SECONDS_TO_WAIT, entry.num_tries * BACKOFF_SECONDS); - auto time_since_last_try_seconds = std::time(nullptr) - entry.last_attempt_time; - /// Otherwise we will constantly look for part on other replicas - /// and load zookeeper too much. - if (time_to_wait_seconds > time_since_last_try_seconds) - { - out_postpone_reason = fmt::format( - "Not executing log entry ({}) to merge parts for part {} because `always_fetch_merged_part` enabled and " - " not enough time had been passed since last try, have to wait {} seconds", - entry.znode_name, entry.new_part_name, time_to_wait_seconds - time_since_last_try_seconds); - - LOG_DEBUG(log, fmt::runtime(out_postpone_reason)); - return false; - } - } - if (isTTLMergeType(entry.merge_type)) { if (merger_mutator.ttl_merges_blocker.isCancelled())