open ObReqQueue wait_finish

This commit is contained in:
zhjc1124
2023-04-03 21:53:15 +00:00
committed by ob-robot
parent 3f311a0f55
commit 5b086ee2da
2 changed files with 5 additions and 7 deletions

View File

@ -32,7 +32,7 @@ using namespace oceanbase::common;
using namespace oceanbase::lib; using namespace oceanbase::lib;
ObReqQueue::ObReqQueue(int queue_capacity) ObReqQueue::ObReqQueue(int queue_capacity)
: wait_finish_(false), : wait_finish_(true),
queue_(), queue_(),
qhandler_(NULL), qhandler_(NULL),
host_() host_()
@ -143,7 +143,6 @@ void ObReqQueue::loop()
int ret = OB_SUCCESS; int ret = OB_SUCCESS;
int64_t timeout = 300 * 1000; int64_t timeout = 300 * 1000;
void *task = NULL; void *task = NULL;
if (OB_ISNULL(qhandler_)) { if (OB_ISNULL(qhandler_)) {
ret = OB_INVALID_ARGUMENT; ret = OB_INVALID_ARGUMENT;
LOG_ERROR("invalid argument", K(qhandler_)); LOG_ERROR("invalid argument", K(qhandler_));
@ -163,10 +162,9 @@ void ObReqQueue::loop()
} // main loop } // main loop
if (!wait_finish_) { if (!wait_finish_) {
LOG_INFO("exiting queue thread without " LOG_INFO("exiting queue thread without wait finish", K(queue_.size()));
"wait finish, remain %ld task", "qsize", queue_.size()); } else if (0 < queue_.size()) {
} else if (0 != queue_.size()) { LOG_INFO("exiting queue thread and wait remain finish", K(queue_.size()));
LOG_INFO("exiting queue thread and wait remain finish");
// Process remains if we should wait until all task has been // Process remains if we should wait until all task has been
// processed before exiting this thread. Previous return code // processed before exiting this thread. Previous return code
// isn't significant, we just ignore it to make progress. When // isn't significant, we just ignore it to make progress. When

View File

@ -1336,7 +1336,7 @@ DEF_INT(sql_net_thread_count, OB_CLUSTER_PARAMETER, "0", "[0,64]",
"the number of global mysql I/O threads. Range: [0, 64] in integer, " "the number of global mysql I/O threads. Range: [0, 64] in integer, "
"default value is 0, 0 stands for old value GCONF.net_thread_count", "default value is 0, 0 stands for old value GCONF.net_thread_count",
ObParameterAttr(Section::OBSERVER, Source::DEFAULT, EditLevel::DYNAMIC_EFFECTIVE)); ObParameterAttr(Section::OBSERVER, Source::DEFAULT, EditLevel::DYNAMIC_EFFECTIVE));
DEF_BOOL(_enable_tenant_sql_net_thread, OB_CLUSTER_PARAMETER, "False", DEF_BOOL(_enable_tenant_sql_net_thread, OB_CLUSTER_PARAMETER, "True",
"Dispatch mysql request to each tenant with True, or disable with False", "Dispatch mysql request to each tenant with True, or disable with False",
ObParameterAttr(Section::OBSERVER, Source::DEFAULT, EditLevel::DYNAMIC_EFFECTIVE)); ObParameterAttr(Section::OBSERVER, Source::DEFAULT, EditLevel::DYNAMIC_EFFECTIVE));
#ifndef ENABLE_SANITY #ifndef ENABLE_SANITY