From d414dea9b9032fba5d09250dbd175b11cc24df2e Mon Sep 17 00:00:00 2001 From: alesapin Date: Fri, 8 Nov 2024 17:26:18 +0100 Subject: [PATCH] Fix crash --- src/Storages/StorageMergeTree.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Storages/StorageMergeTree.cpp b/src/Storages/StorageMergeTree.cpp index 52157e972a4..88cfc08f236 100644 --- a/src/Storages/StorageMergeTree.cpp +++ b/src/Storages/StorageMergeTree.cpp @@ -1132,6 +1132,8 @@ MergeMutateSelectedEntryPtr StorageMergeTree::selectPartsToMerge( select_decision = merger_mutator.selectAllPartsToMergeWithinPartition( future_part, can_merge, partition_id, final, metadata_snapshot, txn, out_disable_reason, optimize_skip_merged_partitions); + future_parts.push_back(future_part); + /// If final - we will wait for currently processing merges to finish and continue. if (final && select_decision != SelectPartsDecision::SELECTED @@ -1148,7 +1150,6 @@ MergeMutateSelectedEntryPtr StorageMergeTree::selectPartsToMerge( } else { - future_parts.push_back(future_part); break; } }