Minor change

This commit is contained in:
Pavel Kruglov 2020-11-11 00:02:11 +03:00
parent 1c35b47073
commit dd06ff4f94
3 changed files with 9 additions and 9 deletions

View File

@ -653,10 +653,10 @@ std::shared_ptr<StorageMergeTree::MergeMutateSelectedEntry> StorageMergeTree::se
if (!left)
return !currently_merging_mutating_parts.count(right);
return !currently_merging_mutating_parts.count(left) && !currently_merging_mutating_parts.count(right)
&& getCurrentMutationVersion(left, lock) == getCurrentMutationVersion(right, lock);
&& getCurrentMutationVersion(left, lock) == getCurrentMutationVersion(right, lock);
};
SelectPartsDecision select_decision = SelectPartsDecision::NOTHING_TO_MERGE;
SelectPartsDecision select_decision;
if (partition_id.empty())
{
@ -696,7 +696,7 @@ std::shared_ptr<StorageMergeTree::MergeMutateSelectedEntry> StorageMergeTree::se
&& out_disable_reason->empty())
{
LOG_DEBUG(log, "Waiting for currently running merges ({} parts are merging right now) to perform OPTIMIZE FINAL",
currently_merging_mutating_parts.size());
currently_merging_mutating_parts.size());
if (std::cv_status::timeout == currently_processing_in_background_condition.wait_for(
lock, std::chrono::seconds(DBMS_DEFAULT_LOCK_ACQUIRE_TIMEOUT_SEC)))

View File

@ -3831,7 +3831,7 @@ bool StorageReplicatedMergeTree::optimize(
}
if (try_no == max_retries)
return handle_noop("Can't create merge queue node in ZooKeeper, because log was updated in every of "
+ toString(max_retries) + " tries");
+ toString(max_retries) + " tries");
}
}
else
@ -3844,7 +3844,7 @@ bool StorageReplicatedMergeTree::optimize(
FutureMergedMutatedPart future_merged_part;
String disable_reason;
SelectPartsDecision select_decision = SelectPartsDecision::NOTHING_TO_MERGE;
SelectPartsDecision select_decision;
if (!partition)
{

View File

@ -2,13 +2,13 @@ DROP TABLE IF EXISTS optimize_final;
CREATE TABLE optimize_final(t DateTime, x Int32) ENGINE = MergeTree() PARTITION BY toYYYYMM(t) ORDER BY x SETTINGS optimize_skip_merged_partitions=1;
INSERT INTO optimize_final SELECT toDate('2000-01-01'), number FROM numbers(5);
INSERT INTO optimize_final SELECT toDate('2000-01-01'), number + 5 FROM numbers(5);
INSERT INTO optimize_final SELECT toDate('2020-01-01'), number FROM numbers(5);
INSERT INTO optimize_final SELECT toDate('2020-01-01'), number + 5 FROM numbers(5);
OPTIMIZE TABLE optimize_final FINAL;
INSERT INTO optimize_final SELECT toDate('2020-01-01'), number FROM numbers(5);
INSERT INTO optimize_final SELECT toDate('2020-01-01'), number + 5 FROM numbers(5);
INSERT INTO optimize_final SELECT toDate('2000-01-01'), number FROM numbers(5);
INSERT INTO optimize_final SELECT toDate('2000-01-01'), number + 5 FROM numbers(5);
OPTIMIZE TABLE optimize_final FINAL;