提交 7c054a95 编写于 作者: Q qianchanger 提交者: linzhigang.lzg

[CP] Fix px rpc process missed the return code in parallel > 1

上级 90c6bd30
......@@ -85,12 +85,9 @@ int ObInitSqcP::process()
arg_.sqc_handler_ = nullptr;
}
// https://work.aone.alibaba-inc.com/issue/37723456
if (OB_SUCCESS != ret && is_schema_error(ret)) {
ret = OB_ERR_WAIT_REMOTE_SCHEMA_REFRESH;
}
// 非rpc框架的错误内容设置到response消息中
// rpc框架的错误码在process中返回OB_SUCCESS
result_.rc_ = ret;
// return value by result_.rc_
return OB_SUCCESS;
......@@ -164,6 +161,9 @@ int ObInitSqcP::after_process()
UNSET_INTERRUPTABLE(arg.sqc_.get_interrupt_id().px_interrupt_id_);
}
}
if (OB_NOT_NULL(sqc_handler) && OB_SUCCESS == sqc_handler->get_end_ret()) {
sqc_handler->set_end_ret(ret);
}
ObPxSqcHandler::release_handler(sqc_handler);
arg_.sqc_handler_ = nullptr;
}
......@@ -254,7 +254,6 @@ int ObInitFastSqcP::process()
}
}
// https://work.aone.alibaba-inc.com/issue/37723456
if (OB_SUCCESS != ret && is_schema_error(ret)) {
ret = OB_ERR_WAIT_REMOTE_SCHEMA_REFRESH;
}
......@@ -356,8 +355,6 @@ void ObDealWithRpcTimeoutCall::deal_with_rpc_timeout_err()
{
if (OB_TIMEOUT == ret_) {
int64_t cur_timestamp = ::oceanbase::common::ObTimeUtility::current_time();
// 由于存在时间精度不一致导致的时间差, 这里需要满足大于100ms才认为不是超时.
// 一个容错的处理.
if (timeout_ts_ - cur_timestamp > 100 * 1000) {
LOG_DEBUG("rpc return OB_TIMEOUT, but it is actually not timeout, "
"change error code to OB_CONNECT_ERROR",
......
......@@ -173,6 +173,10 @@ public:
{
end_ret_ = ret;
}
int get_end_ret()
{
return end_ret_;
}
bool need_rollback();
TO_STRING_KV(K_(tenant_id), K_(reserved_px_thread_count), KP_(notifier), K_(exec_ctx), K_(des_phy_plan),
K_(sqc_init_args), KP_(sub_coord));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册