From 9cf14d2c61c6ac74ec6d8761855a41cadc5b909e Mon Sep 17 00:00:00 2001 From: Vitaliy Lyudvichenko Date: Thu, 2 Nov 2017 17:34:22 +0300 Subject: [PATCH] Remove obsolete code. [#CLICKHOUSE-2] --- dbms/src/Storages/MergeTree/MergeTreeData.h | 7 +------ dbms/src/Storages/MergeTree/MergeTreeDataPart.cpp | 3 +-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/dbms/src/Storages/MergeTree/MergeTreeData.h b/dbms/src/Storages/MergeTree/MergeTreeData.h index 2235a73dbf1..fc038d0c015 100644 --- a/dbms/src/Storages/MergeTree/MergeTreeData.h +++ b/dbms/src/Storages/MergeTree/MergeTreeData.h @@ -541,12 +541,7 @@ private: /// Current set of data parts. DataParts data_parts; mutable std::mutex data_parts_mutex; - - /// The set of all data parts including already merged but not yet deleted. Usually it is small (tens of elements). - /// The part is referenced from here, from the list of current parts and from each thread reading from it. - /// This means that if reference count is 1 - the part is not used right now and can be deleted. -// DataParts all_data_parts; -// mutable std::mutex all_data_parts_mutex; + // TODO: this mutex could be a bottleneck. If so, make it shared, and split parts onto partitions /// Used to serialize calls to grabOldParts. std::mutex grab_old_parts_mutex; diff --git a/dbms/src/Storages/MergeTree/MergeTreeDataPart.cpp b/dbms/src/Storages/MergeTree/MergeTreeDataPart.cpp index a893a8d26d3..04d35b9574d 100644 --- a/dbms/src/Storages/MergeTree/MergeTreeDataPart.cpp +++ b/dbms/src/Storages/MergeTree/MergeTreeDataPart.cpp @@ -538,10 +538,9 @@ void MergeTreeDataPart::remove() const } catch (const Poco::FileNotFoundException & e) { - LOG_WARNING(storage.log, "Directory " << from << " (part to remove) doesn't exist or one of nested files has gone." + LOG_ERROR(storage.log, "Directory " << from << " (part to remove) doesn't exist or one of nested files has gone." " Most likely this is due to manual removing. This should be discouraged. Ignoring."); - std::terminate(); return; }