fix wait init_sqc response core
This commit is contained in:
@ -251,6 +251,9 @@ void ObPxSqcAsyncProxy::fail_process() {
|
|||||||
K(return_cb_count_), K(callbacks_.count()));
|
K(return_cb_count_), K(callbacks_.count()));
|
||||||
ARRAY_FOREACH_X(callbacks_, idx, count, true) {
|
ARRAY_FOREACH_X(callbacks_, idx, count, true) {
|
||||||
ObSqcAsyncCB &callback = *callbacks_.at(idx);
|
ObSqcAsyncCB &callback = *callbacks_.at(idx);
|
||||||
|
{
|
||||||
|
// avoid rpc thread access the callback currently.
|
||||||
|
ObThreadCondGuard guard(callback.get_cond());
|
||||||
if (!callback.is_visited() &&
|
if (!callback.is_visited() &&
|
||||||
!(callback.is_processed() || callback.is_timeout() || callback.is_invalid())) {
|
!(callback.is_processed() || callback.is_timeout() || callback.is_invalid())) {
|
||||||
// unregister async callbacks that have not received response.
|
// unregister async callbacks that have not received response.
|
||||||
@ -264,6 +267,7 @@ void ObPxSqcAsyncProxy::fail_process() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
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) {
|
||||||
|
@ -62,6 +62,7 @@ public:
|
|||||||
const ObPxUserErrorMsg get_ret_code() const { return rcode_; }
|
const ObPxUserErrorMsg get_ret_code() const { return rcode_; }
|
||||||
const common::ObAddr &get_dst() const { return dst_; }
|
const common::ObAddr &get_dst() const { return dst_; }
|
||||||
int64_t get_timeout() const { return timeout_; }
|
int64_t get_timeout() const { return timeout_; }
|
||||||
|
ObThreadCond &get_cond() { return cond_; }
|
||||||
// to string
|
// to string
|
||||||
TO_STRING_KV("dst", get_dst(), "timeout", get_timeout(), "ret_code",
|
TO_STRING_KV("dst", get_dst(), "timeout", get_timeout(), "ret_code",
|
||||||
get_ret_code(), "result", get_result(), "is_visited",
|
get_ret_code(), "result", get_result(), "is_visited",
|
||||||
|
Reference in New Issue
Block a user