open ObReqQueue wait_finish
This commit is contained in:
10
deps/oblib/src/rpc/frame/ob_req_queue_thread.cpp
vendored
10
deps/oblib/src/rpc/frame/ob_req_queue_thread.cpp
vendored
@ -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
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user