mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 00:52:02 +00:00
Do not use c-style cast for std::min(max_part_removal_threads)
This commit is contained in:
parent
2061e581e6
commit
940ff6cb76
@ -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<size_t>(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.
|
||||
|
@ -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<size_t>(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.
|
||||
|
Loading…
Reference in New Issue
Block a user