From 940ff6cb76f107b658b8105eeed5e6c2e85c72d9 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Sun, 11 Apr 2021 12:22:39 +0300 Subject: [PATCH] Do not use c-style cast for std::min(max_part_removal_threads) --- src/Storages/MergeTree/MergeTreeData.cpp | 2 +- src/Storages/StorageReplicatedMergeTree.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Storages/MergeTree/MergeTreeData.cpp b/src/Storages/MergeTree/MergeTreeData.cpp index 00b1b16118f..8866c2beef2 100644 --- a/src/Storages/MergeTree/MergeTreeData.cpp +++ b/src/Storages/MergeTree/MergeTreeData.cpp @@ -1213,7 +1213,7 @@ void MergeTreeData::clearPartsFromFilesystem(const DataPartsVector & parts_to_re { /// Parallel parts removal. - size_t num_threads = std::min(size_t(settings->max_part_removal_threads), parts_to_remove.size()); + size_t num_threads = std::min(settings->max_part_removal_threads, parts_to_remove.size()); ThreadPool pool(num_threads); /// NOTE: Under heavy system load you may get "Cannot schedule a task" from ThreadPool. diff --git a/src/Storages/StorageReplicatedMergeTree.cpp b/src/Storages/StorageReplicatedMergeTree.cpp index fdac474b253..05d81668438 100644 --- a/src/Storages/StorageReplicatedMergeTree.cpp +++ b/src/Storages/StorageReplicatedMergeTree.cpp @@ -5708,7 +5708,7 @@ void StorageReplicatedMergeTree::removePartsFromFilesystem(const DataPartsVector { /// Parallel parts removal. - size_t num_threads = std::min(size_t(settings->max_part_removal_threads), parts.size()); + size_t num_threads = std::min(settings->max_part_removal_threads, parts.size()); ThreadPool pool(num_threads); /// NOTE: Under heavy system load you may get "Cannot schedule a task" from ThreadPool.