diff --git a/dbms/src/Storages/MergeTree/DataPartsExchange.cpp b/dbms/src/Storages/MergeTree/DataPartsExchange.cpp index b3325d1f0dc..6a209223b33 100644 --- a/dbms/src/Storages/MergeTree/DataPartsExchange.cpp +++ b/dbms/src/Storages/MergeTree/DataPartsExchange.cpp @@ -259,9 +259,6 @@ MergeTreeData::MutableDataPartPtr Fetcher::downloadPart( part_file.createDirectory(); - MergeTreeData::MutableDataPartPtr new_data_part = data.createPart(part_name, reservation->getDisk(),relative_part_path); - new_data_part->is_temp = true; - MergeTreeData::DataPart::Checksums checksums; for (size_t i = 0; i < files; ++i) { @@ -305,6 +302,8 @@ MergeTreeData::MutableDataPartPtr Fetcher::downloadPart( assertEOF(in); + MergeTreeData::MutableDataPartPtr new_data_part = data.createPart(part_name, reservation->getDisk(), relative_part_path); + new_data_part->is_temp = true; new_data_part->modification_time = time(nullptr); new_data_part->loadColumnsChecksumsIndexes(true, false); new_data_part->checksums.checkEqual(checksums, false); diff --git a/dbms/src/Storages/MergeTree/MergeTreeDataPartType.h b/dbms/src/Storages/MergeTree/MergeTreeDataPartType.h index a7d176f7baa..bb87918d3a5 100644 --- a/dbms/src/Storages/MergeTree/MergeTreeDataPartType.h +++ b/dbms/src/Storages/MergeTree/MergeTreeDataPartType.h @@ -41,7 +41,7 @@ public: String toString() const; private: - Value value; + Value value; }; }