Loading core/src/db/meta/MySQLConnectionPool.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ #include "db/meta/MySQLConnectionPool.h" #include <fiu-local.h> #include <thread> namespace milvus { namespace engine { Loading @@ -24,7 +25,7 @@ namespace meta { mysqlpp::Connection* MySQLConnectionPool::grab() { while (conns_in_use_ > max_pool_size_) { sleep(1); std::this_thread::sleep_for(std::chrono::milliseconds(10)); } ++conns_in_use_; Loading core/src/db/meta/MySQLMetaImpl.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -314,9 +314,9 @@ MySQLMetaImpl::Initialize() { } // step 3: connect mysql int thread_hint = std::thread::hardware_concurrency(); int max_pool_size = (thread_hint == 0) ? 8 : thread_hint; unsigned int port = 0; unsigned int thread_hint = std::thread::hardware_concurrency(); int max_pool_size = (thread_hint > 8) ? thread_hint : 8; int port = 0; if (!uri_info.port_.empty()) { port = std::stoi(uri_info.port_); } Loading Loading
core/src/db/meta/MySQLConnectionPool.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ #include "db/meta/MySQLConnectionPool.h" #include <fiu-local.h> #include <thread> namespace milvus { namespace engine { Loading @@ -24,7 +25,7 @@ namespace meta { mysqlpp::Connection* MySQLConnectionPool::grab() { while (conns_in_use_ > max_pool_size_) { sleep(1); std::this_thread::sleep_for(std::chrono::milliseconds(10)); } ++conns_in_use_; Loading
core/src/db/meta/MySQLMetaImpl.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -314,9 +314,9 @@ MySQLMetaImpl::Initialize() { } // step 3: connect mysql int thread_hint = std::thread::hardware_concurrency(); int max_pool_size = (thread_hint == 0) ? 8 : thread_hint; unsigned int port = 0; unsigned int thread_hint = std::thread::hardware_concurrency(); int max_pool_size = (thread_hint > 8) ? thread_hint : 8; int port = 0; if (!uri_info.port_.empty()) { port = std::stoi(uri_info.port_); } Loading