Increase the ChunkManager request timeout (#28015) (#28154)

Signed-off-by: yah01 <yah2er0ne@outlook.com>
pull/28177/head
yah01 2023-11-04 10:26:17 +08:00 committed by GitHub
parent 355fcc350d
commit 218a988941
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 17 additions and 14 deletions

View File

@ -95,7 +95,7 @@ minio:
# Cloud whether use virtual host bucket mode
useVirtualHost: false
# timeout for request time in milliseconds
requestTimeoutMs: 3000
requestTimeoutMs: 10000
# Milvus supports four MQ: rocksmq(based on RockDB), natsmq(embedded nats-server), Pulsar and Kafka.
# You can change your mq by setting mq.type field.

View File

@ -53,4 +53,4 @@ constexpr const char* RANGE_FILTER = knowhere::meta::RANGE_FILTER;
const int64_t DEFAULT_MAX_OUTPUT_SIZE = 67108864; // bytes, 64MB
const int64_t DEFAULT_CHUNK_MANAGER_REQUEST_TIMEOUT_MS = 3000;
const int64_t DEFAULT_CHUNK_MANAGER_REQUEST_TIMEOUT_MS = 10000;

View File

@ -37,9 +37,9 @@ ThreadPool::ShutDown() {
shutdown_ = true;
}
condition_lock_.notify_all();
for (auto iter = threads_.begin(); iter != threads_.end(); ++iter) {
if (iter->second.joinable()) {
iter->second.join();
for (auto& thread : threads_) {
if (thread.second.joinable()) {
thread.second.join();
}
}
LOG_SEGCORE_INFO_ << "Finish shutting down " << name_;

View File

@ -33,9 +33,8 @@ namespace milvus {
class ThreadPool {
public:
explicit ThreadPool(const int thread_core_coefficient,
const std::string& name)
: shutdown_(false), name_(name) {
explicit ThreadPool(const int thread_core_coefficient, std::string name)
: shutdown_(false), name_(std::move(name)) {
idle_threads_size_ = 0;
current_threads_size_ = 0;
min_threads_size_ = CPU_NUM;
@ -69,6 +68,11 @@ class ThreadPool {
return current_threads_size_;
}
size_t
GetMaxThreadNum() {
return max_threads_size_;
}
template <typename F, typename... Args>
auto
// Submit(F&& f, Args&&... args) -> std::future<decltype(f(args...))>;

View File

@ -27,13 +27,12 @@ bool ThreadPools::has_setup_coefficients = false;
void
ThreadPools::ShutDown() {
for (auto itr = thread_pool_map.begin(); itr != thread_pool_map.end();
++itr) {
for (auto& itr : thread_pool_map) {
LOG_SEGCORE_INFO_ << "Start shutting down threadPool with priority:"
<< itr->first;
itr->second->ShutDown();
<< itr.first;
itr.second->ShutDown();
LOG_SEGCORE_INFO_ << "Finish shutting down threadPool with priority:"
<< itr->first;
<< itr.first;
}
}

View File

@ -51,7 +51,7 @@ const (
DefaultKnowhereThreadPoolNumRatioInBuild = 1
DefaultMinioRegion = ""
DefaultMinioUseVirtualHost = "false"
DefaultMinioRequestTimeout = "3000"
DefaultMinioRequestTimeout = "10000"
)
// Const of Global Config List