oceanbase
oceanbase copied to clipboard
ObReqQueue::loop() code issues
code review problem
https://github.com/oceanbase/oceanbase/blob/master/deps/oblib/src/rpc/frame/ob_req_queue_thread.cpp#166
} else if (0 == queue_.size()) {
LOG_INFO("exiting queue thread and wait remain finish");
// Process remains if we should wait until all task has been
// processed before exiting this thread. Previous return code
// isn't significant, we just ignore it to make progress. When
// queue pop a normal task we process it until pop fails.
ret = OB_SUCCESS;
while (OB_SUCC(ret)) {
if (OB_FAIL(queue_.pop(task, timeout))) {
LOG_DEBUG("queue pop task fail", K(&queue_));
} else if (NULL != task) {
process_task(task); // ignore return code.
} else {
// unexpected
LOG_ERROR("queue pop successfully but task is NULL");
}
}
}
line 166 should be
} else if (0 != queue_.size()) {
Good Catch. Thanks
Could you please raise one pull request for this issue.