diff --git a/src/sql/engine/px/ob_px_rpc_processor.cpp b/src/sql/engine/px/ob_px_rpc_processor.cpp index bcae0d5c6cbc4999f39ea275b157eda6ece703a3..d0d0f896467db6b8dcdf92f8fd6b098aa585d24d 100644 --- a/src/sql/engine/px/ob_px_rpc_processor.cpp +++ b/src/sql/engine/px/ob_px_rpc_processor.cpp @@ -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", diff --git a/src/sql/engine/px/ob_px_sqc_handler.h b/src/sql/engine/px/ob_px_sqc_handler.h index 9d6cd2115f1da18ec57966fb3beee49c292e8f22..efd6531620ef6d1c6ced1b40a5872f497f7569b3 100644 --- a/src/sql/engine/px/ob_px_sqc_handler.h +++ b/src/sql/engine/px/ob_px_sqc_handler.h @@ -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));