mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Minor change
This commit is contained in:
parent
148dc71d0e
commit
4c30857759
@ -370,7 +370,7 @@ SelectPartsDecision MergeTreeDataMergerMutator::selectAllPartsToMergeWithinParti
|
||||
MergeTreeData::DataPartsVector parts = selectAllPartsFromPartition(partition_id);
|
||||
|
||||
if (parts.empty())
|
||||
return SelectPartsDecision::NOTHING_TO_MERGE;
|
||||
return SelectPartsDecision::CANNOT_SELECT;
|
||||
|
||||
if (!final && parts.size() == 1)
|
||||
{
|
||||
@ -396,7 +396,7 @@ SelectPartsDecision MergeTreeDataMergerMutator::selectAllPartsToMergeWithinParti
|
||||
/// For the case of one part, we check that it can be merged "with itself".
|
||||
if ((it != parts.begin() || parts.size() == 1) && !can_merge(*prev_it, *it, out_disable_reason))
|
||||
{
|
||||
return SelectPartsDecision::NOTHING_TO_MERGE;
|
||||
return SelectPartsDecision::CANNOT_SELECT;
|
||||
}
|
||||
|
||||
sum_bytes += (*it)->getBytesOnDisk();
|
||||
|
@ -747,8 +747,8 @@ bool StorageMergeTree::merge(
|
||||
|
||||
auto merge_mutate_entry = selectPartsToMerge(metadata_snapshot, aggressive, partition_id, final, out_disable_reason, table_lock_holder, &select_decision);
|
||||
|
||||
/// If final and there is nothing to merge then we treat this merge as successful
|
||||
if (final && select_decision == SelectPartsDecision::NOTHING_TO_MERGE)
|
||||
/// If there is nothing to merge then we treat this merge as successful (needed for optimize final optimization)
|
||||
if (select_decision == SelectPartsDecision::NOTHING_TO_MERGE)
|
||||
return true;
|
||||
|
||||
if (!merge_mutate_entry)
|
||||
|
@ -3859,7 +3859,8 @@ bool StorageReplicatedMergeTree::optimize(
|
||||
future_merged_part, disk_space, can_merge, partition_id, final, metadata_snapshot, &disable_reason);
|
||||
}
|
||||
|
||||
if (final && select_decision == SelectPartsDecision::NOTHING_TO_MERGE)
|
||||
/// If there is nothing to merge then we treat this merge as successful (needed for optimize final optimization)
|
||||
if (select_decision == SelectPartsDecision::NOTHING_TO_MERGE)
|
||||
break;
|
||||
|
||||
if (select_decision != SelectPartsDecision::SELECTED)
|
||||
|
Loading…
Reference in New Issue
Block a user