[CP] fix try wait channel cost much CPU
This commit is contained in:
parent
7f968fd79f
commit
c515689c1b
@ -343,6 +343,9 @@ int ObPxTransmitOp::init_channel(ObPxTransmitOpInput &trans_input)
|
||||
LOG_WARN("fail to get ch provider ptr", K(ret));
|
||||
} else {
|
||||
use_interm_result = sqc_proxy->get_transmit_use_interm_result();
|
||||
if (!need_wait_sync_msg(*sqc_proxy, min_cluster_version)) {
|
||||
receive_channel_ready_ = true;
|
||||
}
|
||||
}
|
||||
loop_.set_interm_result(use_interm_result);
|
||||
int64_t thread_id = GETTID();
|
||||
@ -1161,16 +1164,7 @@ int ObPxTransmitOp::wait_channel_ready_msg()
|
||||
int ObPxTransmitOp::try_wait_channel()
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
ObPxSQCProxy *sqc_proxy = NULL;
|
||||
uint64_t min_cluster_version = 0;
|
||||
CK (OB_NOT_NULL(ctx_.get_physical_plan_ctx()) && OB_NOT_NULL(ctx_.get_physical_plan_ctx()->get_phy_plan()));
|
||||
OX (min_cluster_version = ctx_.get_physical_plan_ctx()->get_phy_plan()->get_min_cluster_version());
|
||||
if (OB_FAIL(ret)) {
|
||||
} else if (OB_ISNULL(sqc_proxy = reinterpret_cast<ObPxSQCProxy *>(
|
||||
(reinterpret_cast<ObPxTransmitOpInput *> (input_))->get_ch_provider_ptr()))) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("fail to get ch provider ptr", K(ret));
|
||||
} else if (need_wait_sync_msg(*sqc_proxy, min_cluster_version) && OB_FAIL(wait_channel_ready_msg())) {
|
||||
if (OB_UNLIKELY(!receive_channel_ready_) && OB_FAIL(wait_channel_ready_msg())) {
|
||||
LOG_WARN("failed to wait channel ready msg", K(ret));
|
||||
}
|
||||
return ret;
|
||||
|
Loading…
x
Reference in New Issue
Block a user