From a47f0b1a609e21598df924db84327c5cf6e5536d Mon Sep 17 00:00:00 2001 From: Guillaume Tassery Date: Mon, 16 Sep 2019 10:56:30 +0200 Subject: [PATCH] cleanup partition after moving it --- dbms/src/Storages/StorageMergeTree.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dbms/src/Storages/StorageMergeTree.cpp b/dbms/src/Storages/StorageMergeTree.cpp index 5558008c244..f736aecfa7a 100644 --- a/dbms/src/Storages/StorageMergeTree.cpp +++ b/dbms/src/Storages/StorageMergeTree.cpp @@ -1234,6 +1234,9 @@ void StorageMergeTree::movePartitionTo(const StoragePtr & dest_table, const ASTP removePartsFromWorkingSet(src_parts, true, data_parts_lock); } + clearOldMutations(true); + clearOldPartsFromFilesystem(); + PartLog::addNewParts(global_context, dst_parts, watch.elapsed()); } catch (...)