mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-28 10:31:57 +00:00
Fxi for storage merge tree
This commit is contained in:
parent
81a6708660
commit
17d65080fa
@ -1005,8 +1005,28 @@ MergeMutateSelectedEntryPtr StorageMergeTree::selectPartsToMerge(
|
|||||||
CurrentlyMergingPartsTaggerPtr merging_tagger;
|
CurrentlyMergingPartsTaggerPtr merging_tagger;
|
||||||
MergeList::EntryPtr merge_entry;
|
MergeList::EntryPtr merge_entry;
|
||||||
|
|
||||||
auto can_merge = [this, &lock](const DataPartPtr & left, const DataPartPtr & right, const MergeTreeTransaction * tx, PreformattedMessage & disable_reason) -> bool
|
auto can_merge = [this, &lock](const DataPartPtr & left_, const DataPartPtr & right_, const MergeTreeTransaction * tx, PreformattedMessage & disable_reason) -> bool
|
||||||
{
|
{
|
||||||
|
DataPartPtr left, right;
|
||||||
|
|
||||||
|
if (left_)
|
||||||
|
{
|
||||||
|
if (left_->info.min_block > right_->info.min_block)
|
||||||
|
{
|
||||||
|
left = right_;
|
||||||
|
right = left_;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
left = left_;
|
||||||
|
right = right_;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
right = right_;
|
||||||
|
}
|
||||||
|
|
||||||
if (tx)
|
if (tx)
|
||||||
{
|
{
|
||||||
/// Cannot merge parts if some of them are not visible in current snapshot
|
/// Cannot merge parts if some of them are not visible in current snapshot
|
||||||
|
Loading…
Reference in New Issue
Block a user