From 6f9f7d118da12c9988d98f7a68db18800a04d903 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Sun, 28 Mar 2021 04:27:26 +0300 Subject: [PATCH] Fixes --- programs/server/config.xml | 6 ++++-- src/Storages/MergeTree/MergeTreeData.cpp | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/programs/server/config.xml b/programs/server/config.xml index 543f7c54ca6..50c29e05a4c 100644 --- a/programs/server/config.xml +++ b/programs/server/config.xml @@ -297,20 +297,22 @@ --> 5368709120 + 1000 diff --git a/src/Storages/MergeTree/MergeTreeData.cpp b/src/Storages/MergeTree/MergeTreeData.cpp index 039b9281135..f5007918a22 100644 --- a/src/Storages/MergeTree/MergeTreeData.cpp +++ b/src/Storages/MergeTree/MergeTreeData.cpp @@ -1163,7 +1163,8 @@ void MergeTreeData::clearOldPartsFromFilesystem(bool force) /// This is needed to close files to avoid they reside on disk after being deleted. /// NOTE: we can drop files from cache more selectively but this is good enough. - global_context.dropMappedFileCache(); + if (!parts_to_remove.empty()) + global_context.dropMappedFileCache(); } void MergeTreeData::clearPartsFromFilesystem(const DataPartsVector & parts_to_remove)