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); }