From 7fb97708f3c3f658b4a027f4f3ac6ca01af3f12d Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Fri, 14 Feb 2014 19:38:13 +0000 Subject: [PATCH] dbms: removing old_ parts before attempt to merge [#METR-10069]. --- dbms/src/Storages/StorageMergeTree.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dbms/src/Storages/StorageMergeTree.cpp b/dbms/src/Storages/StorageMergeTree.cpp index 5934b20a60a..4e55321ed7c 100644 --- a/dbms/src/Storages/StorageMergeTree.cpp +++ b/dbms/src/Storages/StorageMergeTree.cpp @@ -769,6 +769,9 @@ void StorageMergeTree::mergeThread(bool while_can, bool aggressive) { while (!shutdown_called) { + /// Удаляем старые куски. + clearOldParts(); + { /// К концу этого логического блока должен быть вызван деструктор, чтобы затем корректно определить удаленные куски Poco::SharedPtr what; @@ -782,9 +785,6 @@ void StorageMergeTree::mergeThread(bool while_can, bool aggressive) if (shutdown_called) break; - /// Удаляем старые куски. - clearOldParts(); - if (!while_can) break; }