fix not exit immediately when session killed
This commit is contained in:
@ -249,6 +249,21 @@ void ObPxSqcAsyncProxy::fail_process() {
|
|||||||
LOG_WARN_RET(OB_SUCCESS,
|
LOG_WARN_RET(OB_SUCCESS,
|
||||||
"async sqc fails, process the callbacks that have not yet got results",
|
"async sqc fails, process the callbacks that have not yet got results",
|
||||||
K(return_cb_count_), K(callbacks_.count()));
|
K(return_cb_count_), K(callbacks_.count()));
|
||||||
|
ARRAY_FOREACH_X(callbacks_, idx, count, true) {
|
||||||
|
ObSqcAsyncCB &callback = *callbacks_.at(idx);
|
||||||
|
if (!callback.is_visited() &&
|
||||||
|
!(callback.is_processed() || callback.is_timeout() || callback.is_invalid())) {
|
||||||
|
// unregister async callbacks that have not received response.
|
||||||
|
ObAsyncRespCallback *async_cb = static_cast<ObAsyncRespCallback *>(callback.low_level_cb_);
|
||||||
|
uint64_t gtid = async_cb->gtid_;
|
||||||
|
uint32_t pkt_id = async_cb->pkt_id_;
|
||||||
|
int err = 0;
|
||||||
|
if ((err = pn_terminate_pkt(gtid, pkt_id)) != 0) {
|
||||||
|
int ret = tranlate_to_ob_error(err);
|
||||||
|
LOG_WARN("terminate pkt failed", K(ret), K(err));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
while (return_cb_count_ < callbacks_.count()) {
|
while (return_cb_count_ < callbacks_.count()) {
|
||||||
ObThreadCondGuard guard(cond_);
|
ObThreadCondGuard guard(cond_);
|
||||||
ARRAY_FOREACH_X(callbacks_, idx, count, true) {
|
ARRAY_FOREACH_X(callbacks_, idx, count, true) {
|
||||||
|
Reference in New Issue
Block a user