Fix parallel loading of data parts

This commit is contained in:
Alexey Milovidov 2022-02-04 02:29:46 +03:00
parent a01a74e415
commit 78eebd5c7c
2 changed files with 2 additions and 2 deletions

View File

@ -54,6 +54,8 @@ void ThreadPoolImpl<Thread>::setMaxThreads(size_t value)
{
std::lock_guard lock(mutex);
max_threads = value;
queue_size = std::max(queue_size, max_threads);
jobs.reserve(queue_size);
}
template <typename Thread>

View File

@ -1286,7 +1286,6 @@ void MergeTreeData::loadDataParts(bool skip_sanity_checks)
return;
}
DataPartsVector broken_parts_to_detach;
DataPartsVector duplicate_parts_to_remove;
@ -1357,7 +1356,6 @@ void MergeTreeData::loadDataParts(bool skip_sanity_checks)
calculateColumnAndSecondaryIndexSizesImpl();
LOG_DEBUG(log, "Loaded data parts ({} items)", data_parts_indexes.size());
}