From b1ebc6da46606a5e184a2e79e50ae35422a0f8aa Mon Sep 17 00:00:00 2001 From: Alexey Zatelepin Date: Mon, 7 May 2018 14:53:10 +0300 Subject: [PATCH] fix initialization of the name of the merged part --- dbms/src/Storages/MergeTree/MergeTreeDataMerger.cpp | 1 + dbms/src/Storages/StorageMergeTree.cpp | 5 ----- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/dbms/src/Storages/MergeTree/MergeTreeDataMerger.cpp b/dbms/src/Storages/MergeTree/MergeTreeDataMerger.cpp index 34848ea6541..5375be89710 100644 --- a/dbms/src/Storages/MergeTree/MergeTreeDataMerger.cpp +++ b/dbms/src/Storages/MergeTree/MergeTreeDataMerger.cpp @@ -92,6 +92,7 @@ void MergeTreeDataMerger::FuturePart::assign(MergeTreeData::DataPartsVector part part_info.min_block = parts.front()->info.min_block; part_info.max_block = parts.back()->info.max_block; part_info.level = max_level + 1; + part_info.version = parts.front()->info.version; if (parts.front()->storage.format_version < MERGE_TREE_DATA_MIN_FORMAT_VERSION_WITH_CUSTOM_PARTITIONING) { diff --git a/dbms/src/Storages/StorageMergeTree.cpp b/dbms/src/Storages/StorageMergeTree.cpp index a77aa2a2897..7ef4a9c0d9e 100644 --- a/dbms/src/Storages/StorageMergeTree.cpp +++ b/dbms/src/Storages/StorageMergeTree.cpp @@ -388,11 +388,6 @@ bool StorageMergeTree::merge( if (!selected) return false; - /// TODO: move to FuturePart initialization. - Int64 mutation_version = getCurrentMutationVersion(future_part.parts.front(), lock); - if (future_part.part_info.min_block < mutation_version) - future_part.part_info.version = mutation_version; - merging_tagger.emplace(future_part.parts, MergeTreeDataMerger::estimateDiskSpaceForMerge(future_part.parts), *this); }