mirror of https://github.com/milvus-io/milvus.git
Signed-off-by: yah01 <yah2er0ne@outlook.com>pull/28177/head
parent
355fcc350d
commit
218a988941
|
@ -95,7 +95,7 @@ minio:
|
||||||
# Cloud whether use virtual host bucket mode
|
# Cloud whether use virtual host bucket mode
|
||||||
useVirtualHost: false
|
useVirtualHost: false
|
||||||
# timeout for request time in milliseconds
|
# 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.
|
# 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.
|
# You can change your mq by setting mq.type field.
|
||||||
|
|
|
@ -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_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;
|
||||||
|
|
|
@ -37,9 +37,9 @@ ThreadPool::ShutDown() {
|
||||||
shutdown_ = true;
|
shutdown_ = true;
|
||||||
}
|
}
|
||||||
condition_lock_.notify_all();
|
condition_lock_.notify_all();
|
||||||
for (auto iter = threads_.begin(); iter != threads_.end(); ++iter) {
|
for (auto& thread : threads_) {
|
||||||
if (iter->second.joinable()) {
|
if (thread.second.joinable()) {
|
||||||
iter->second.join();
|
thread.second.join();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOG_SEGCORE_INFO_ << "Finish shutting down " << name_;
|
LOG_SEGCORE_INFO_ << "Finish shutting down " << name_;
|
||||||
|
|
|
@ -33,9 +33,8 @@ namespace milvus {
|
||||||
|
|
||||||
class ThreadPool {
|
class ThreadPool {
|
||||||
public:
|
public:
|
||||||
explicit ThreadPool(const int thread_core_coefficient,
|
explicit ThreadPool(const int thread_core_coefficient, std::string name)
|
||||||
const std::string& name)
|
: shutdown_(false), name_(std::move(name)) {
|
||||||
: shutdown_(false), name_(name) {
|
|
||||||
idle_threads_size_ = 0;
|
idle_threads_size_ = 0;
|
||||||
current_threads_size_ = 0;
|
current_threads_size_ = 0;
|
||||||
min_threads_size_ = CPU_NUM;
|
min_threads_size_ = CPU_NUM;
|
||||||
|
@ -69,6 +68,11 @@ class ThreadPool {
|
||||||
return current_threads_size_;
|
return current_threads_size_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
size_t
|
||||||
|
GetMaxThreadNum() {
|
||||||
|
return max_threads_size_;
|
||||||
|
}
|
||||||
|
|
||||||
template <typename F, typename... Args>
|
template <typename F, typename... Args>
|
||||||
auto
|
auto
|
||||||
// Submit(F&& f, Args&&... args) -> std::future<decltype(f(args...))>;
|
// Submit(F&& f, Args&&... args) -> std::future<decltype(f(args...))>;
|
||||||
|
|
|
@ -27,13 +27,12 @@ bool ThreadPools::has_setup_coefficients = false;
|
||||||
|
|
||||||
void
|
void
|
||||||
ThreadPools::ShutDown() {
|
ThreadPools::ShutDown() {
|
||||||
for (auto itr = thread_pool_map.begin(); itr != thread_pool_map.end();
|
for (auto& itr : thread_pool_map) {
|
||||||
++itr) {
|
|
||||||
LOG_SEGCORE_INFO_ << "Start shutting down threadPool with priority:"
|
LOG_SEGCORE_INFO_ << "Start shutting down threadPool with priority:"
|
||||||
<< itr->first;
|
<< itr.first;
|
||||||
itr->second->ShutDown();
|
itr.second->ShutDown();
|
||||||
LOG_SEGCORE_INFO_ << "Finish shutting down threadPool with priority:"
|
LOG_SEGCORE_INFO_ << "Finish shutting down threadPool with priority:"
|
||||||
<< itr->first;
|
<< itr.first;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@ const (
|
||||||
DefaultKnowhereThreadPoolNumRatioInBuild = 1
|
DefaultKnowhereThreadPoolNumRatioInBuild = 1
|
||||||
DefaultMinioRegion = ""
|
DefaultMinioRegion = ""
|
||||||
DefaultMinioUseVirtualHost = "false"
|
DefaultMinioUseVirtualHost = "false"
|
||||||
DefaultMinioRequestTimeout = "3000"
|
DefaultMinioRequestTimeout = "10000"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Const of Global Config List
|
// Const of Global Config List
|
||||||
|
|
Loading…
Reference in New Issue