mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Minor change
This commit is contained in:
parent
1c35b47073
commit
dd06ff4f94
@ -653,10 +653,10 @@ std::shared_ptr<StorageMergeTree::MergeMutateSelectedEntry> StorageMergeTree::se
|
|||||||
if (!left)
|
if (!left)
|
||||||
return !currently_merging_mutating_parts.count(right);
|
return !currently_merging_mutating_parts.count(right);
|
||||||
return !currently_merging_mutating_parts.count(left) && !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())
|
if (partition_id.empty())
|
||||||
{
|
{
|
||||||
@ -696,7 +696,7 @@ std::shared_ptr<StorageMergeTree::MergeMutateSelectedEntry> StorageMergeTree::se
|
|||||||
&& out_disable_reason->empty())
|
&& out_disable_reason->empty())
|
||||||
{
|
{
|
||||||
LOG_DEBUG(log, "Waiting for currently running merges ({} parts are merging right now) to perform OPTIMIZE FINAL",
|
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(
|
if (std::cv_status::timeout == currently_processing_in_background_condition.wait_for(
|
||||||
lock, std::chrono::seconds(DBMS_DEFAULT_LOCK_ACQUIRE_TIMEOUT_SEC)))
|
lock, std::chrono::seconds(DBMS_DEFAULT_LOCK_ACQUIRE_TIMEOUT_SEC)))
|
||||||
|
@ -3831,7 +3831,7 @@ bool StorageReplicatedMergeTree::optimize(
|
|||||||
}
|
}
|
||||||
if (try_no == max_retries)
|
if (try_no == max_retries)
|
||||||
return handle_noop("Can't create merge queue node in ZooKeeper, because log was updated in every of "
|
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
|
else
|
||||||
@ -3844,7 +3844,7 @@ bool StorageReplicatedMergeTree::optimize(
|
|||||||
|
|
||||||
FutureMergedMutatedPart future_merged_part;
|
FutureMergedMutatedPart future_merged_part;
|
||||||
String disable_reason;
|
String disable_reason;
|
||||||
SelectPartsDecision select_decision = SelectPartsDecision::NOTHING_TO_MERGE;
|
SelectPartsDecision select_decision;
|
||||||
|
|
||||||
if (!partition)
|
if (!partition)
|
||||||
{
|
{
|
||||||
|
@ -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;
|
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('2020-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 + 5 FROM numbers(5);
|
||||||
|
|
||||||
OPTIMIZE TABLE optimize_final FINAL;
|
OPTIMIZE TABLE optimize_final FINAL;
|
||||||
|
|
||||||
INSERT INTO optimize_final SELECT toDate('2020-01-01'), number FROM numbers(5);
|
INSERT INTO optimize_final SELECT toDate('2000-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 + 5 FROM numbers(5);
|
||||||
|
|
||||||
OPTIMIZE TABLE optimize_final FINAL;
|
OPTIMIZE TABLE optimize_final FINAL;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user