fix overwrite error code in errism mode

This commit is contained in:
obdev
2024-05-27 11:06:49 +00:00
committed by ob-robot
parent b1a5a6cbde
commit cc18ead6d9
10 changed files with 38 additions and 39 deletions

View File

@ -175,12 +175,10 @@ int ObTempTableTransformationOp::destory_interm_results()
} }
#ifdef ERRSIM #ifdef ERRSIM
ObSQLSessionInfo *session = ctx_.get_my_session(); int ecode = EventTable::EN_PX_TEMP_TABLE_NOT_DESTROY_REMOTE_INTERM_RESULT;
int64_t query_timeout = 0; if (OB_SUCCESS != ecode && OB_SUCC(ret)) {
session->get_query_timeout(query_timeout); LOG_WARN("ObTempTableTransformationOp not destory_remote_interm_results by design", K(ret));
if (OB_FAIL(OB_E(EventTable::EN_PX_TEMP_TABLE_NOT_DESTROY_REMOTE_INTERM_RESULT) OB_SUCCESS)) { return ret;
LOG_WARN("ObTempTableTransformationOp not destory_remote_interm_results by design", K(ret), K(query_timeout));
return OB_SUCCESS;
} }
#endif #endif

View File

@ -143,12 +143,10 @@ int ObTempTableTransformationVecOp::destory_interm_results()
} }
#ifdef ERRSIM #ifdef ERRSIM
ObSQLSessionInfo *session = ctx_.get_my_session(); int ecode = EventTable::EN_PX_TEMP_TABLE_NOT_DESTROY_REMOTE_INTERM_RESULT;
int64_t query_timeout = 0; if (OB_SUCCESS != ecode && OB_SUCC(ret)) {
session->get_query_timeout(query_timeout); LOG_WARN("ObTempTableTransformationOp not destory_remote_interm_results by design", K(ret));
if (OB_FAIL(OB_E(EventTable::EN_PX_TEMP_TABLE_NOT_DESTROY_REMOTE_INTERM_RESULT) OB_SUCCESS)) { return ret;
LOG_WARN("ObTempTableTransformationVecOp not destory_remote_interm_results by design", K(ret), K(query_timeout));
return OB_SUCCESS;
} }
#endif #endif

View File

@ -220,9 +220,11 @@ int ObExprJoinFilter::check_rf_ready(
while (!join_filter_ctx->is_ready() && OB_SUCC(exec_ctx.fast_check_status())) { while (!join_filter_ctx->is_ready() && OB_SUCC(exec_ctx.fast_check_status())) {
if (OB_NOT_NULL(rf_msg)) { if (OB_NOT_NULL(rf_msg)) {
#ifdef ERRSIM #ifdef ERRSIM
if (OB_FAIL(OB_E(EventTable::EN_PX_JOIN_FILTER_HOLD_MSG) OB_SUCCESS)) { int ecode = EventTable::EN_PX_JOIN_FILTER_HOLD_MSG;
if (OB_SUCCESS != ecode && OB_SUCC(ret)) {
LOG_WARN("join filter hold msg by design", K(ret)); LOG_WARN("join filter hold msg by design", K(ret));
ob_usleep(80000000); ob_usleep(80000000);
ret = ecode;
} }
#endif #endif
if (rf_msg->check_ready()) { if (rf_msg->check_ready()) {

View File

@ -751,7 +751,8 @@ int ObJoinFilterOp::try_merge_join_filter()
{ {
int ret = OB_SUCCESS; int ret = OB_SUCCESS;
#ifdef ERRSIM #ifdef ERRSIM
if (OB_FAIL(OB_E(EventTable::EN_PX_JOIN_FILTER_NOT_MERGE_MSG) OB_SUCCESS)) { int ecode = EventTable::EN_PX_JOIN_FILTER_NOT_MERGE_MSG;
if (OB_SUCCESS != ecode && OB_SUCC(ret)) {
LOG_WARN("ERRSIM match, don't merge_join_filter by desigin", K(ret)); LOG_WARN("ERRSIM match, don't merge_join_filter by desigin", K(ret));
return OB_SUCCESS; return OB_SUCCESS;
} }

View File

@ -142,10 +142,11 @@ int ObPxFifoCoordOp::fetch_rows(const int64_t row_cnt)
ObSQLSessionInfo *session = ctx_.get_my_session(); ObSQLSessionInfo *session = ctx_.get_my_session();
int64_t query_timeout = 0; int64_t query_timeout = 0;
session->get_query_timeout(query_timeout); session->get_query_timeout(query_timeout);
if (OB_FAIL(OB_E(EventTable::EN_PX_QC_EARLY_TERMINATE, query_timeout) OB_SUCCESS)) { int ecode = EVENT_CALL(EventTable::EN_PX_QC_EARLY_TERMINATE, query_timeout);
LOG_WARN("fifo qc not interrupt qc by design", K(ret), K(query_timeout)); if (OB_SUCCESS != ecode && OB_SUCC(ret)) {
LOG_WARN("fifo qc not interrupt qc by design", K(ecode), K(query_timeout));
sleep(14); sleep(14);
return ret; return ecode;
} }
#endif #endif

View File

@ -505,11 +505,9 @@ int ObPxReceiveOp::erase_dtl_interm_result()
{ {
int ret = OB_SUCCESS; int ret = OB_SUCCESS;
#ifdef ERRSIM #ifdef ERRSIM
ObSQLSessionInfo *session = ctx_.get_my_session(); int ecode = EventTable::EN_PX_SINGLE_DFO_NOT_ERASE_DTL_INTERM_RESULT;
int64_t query_timeout = 0; if (OB_SUCCESS != ecode && OB_SUCC(ret)) {
session->get_query_timeout(query_timeout); LOG_WARN("ObPxCoordOp not erase_dtl_interm_result by design", K(ret));
if (OB_FAIL(OB_E(EventTable::EN_PX_SINGLE_DFO_NOT_ERASE_DTL_INTERM_RESULT) OB_SUCCESS)) {
LOG_WARN("ObPxCoordOp not erase_dtl_interm_result by design", K(ret), K(query_timeout));
return OB_SUCCESS; return OB_SUCCESS;
} }
#endif #endif

View File

@ -437,11 +437,9 @@ int ObPxCoordOp::try_clear_p2p_dh_info()
int ret = OB_SUCCESS; int ret = OB_SUCCESS;
#ifdef ERRSIM #ifdef ERRSIM
ObSQLSessionInfo *session = ctx_.get_my_session(); int ecode = EventTable::EN_PX_NOT_ERASE_P2P_DH_MSG;
int64_t query_timeout = 0; if (OB_SUCCESS != ecode && OB_SUCC(ret)) {
session->get_query_timeout(query_timeout); LOG_WARN("qc not clear p2p dh info by design", K(ret));
if (OB_FAIL(OB_E(EventTable::EN_PX_NOT_ERASE_P2P_DH_MSG) OB_SUCCESS)) {
LOG_WARN("qc not clear p2p dh info by design", K(ret), K(query_timeout));
return OB_SUCCESS; return OB_SUCCESS;
} }
#endif #endif
@ -514,9 +512,11 @@ int ObPxCoordOp::inner_close()
ObSQLSessionInfo *session = ctx_.get_my_session(); ObSQLSessionInfo *session = ctx_.get_my_session();
int64_t query_timeout = 0; int64_t query_timeout = 0;
session->get_query_timeout(query_timeout); session->get_query_timeout(query_timeout);
if (OB_FAIL(OB_E(EventTable::EN_PX_QC_EARLY_TERMINATE, query_timeout) OB_SUCCESS)) { int ecode = EVENT_CALL(EventTable::EN_PX_QC_EARLY_TERMINATE, query_timeout);
LOG_WARN("qc not interrupt qc by design", K(ret), K(query_timeout)); if (OB_SUCCESS != ecode && OB_SUCC(ret)) {
LOG_WARN("qc not interrupt qc by design", K(ecode), K(query_timeout));
should_terminate_running_dfos = false; should_terminate_running_dfos = false;
ret = ecode;
} }
#endif #endif
@ -1046,11 +1046,9 @@ int ObPxCoordOp::erase_dtl_interm_result()
{ {
int ret = OB_SUCCESS; int ret = OB_SUCCESS;
#ifdef ERRSIM #ifdef ERRSIM
ObSQLSessionInfo *session = ctx_.get_my_session(); int ecode = EventTable::EN_PX_SINGLE_DFO_NOT_ERASE_DTL_INTERM_RESULT;
int64_t query_timeout = 0; if (OB_SUCCESS != ecode && OB_SUCC(ret)) {
session->get_query_timeout(query_timeout); LOG_WARN("ObPxCoordOp not erase_dtl_interm_result by design", K(ret));
if (OB_FAIL(OB_E(EventTable::EN_PX_SINGLE_DFO_NOT_ERASE_DTL_INTERM_RESULT) OB_SUCCESS)) {
LOG_WARN("ObPxCoordOp not erase_dtl_interm_result by design", K(ret), K(query_timeout));
return OB_SUCCESS; return OB_SUCCESS;
} }
#endif #endif

View File

@ -106,8 +106,10 @@ int ObInitSqcP::process()
} }
#ifdef ERRSIM #ifdef ERRSIM
if (OB_FAIL(OB_E(EventTable::EN_PX_SQC_INIT_PROCESS_FAILED) OB_SUCCESS)) { int ecode = EventTable::EN_PX_SQC_INIT_PROCESS_FAILED;
LOG_WARN("match sqc execute errism", K(ret)); if (OB_SUCCESS != ecode && OB_SUCC(ret)) {
LOG_WARN("match sqc execute errism", K(ecode));
ret = ecode;
} }
#endif #endif

View File

@ -339,10 +339,10 @@ int ObPxMsgProc::process_sqc_finish_msg_once(ObExecContext &ctx, const ObPxFinis
// process for DM, mark sqc finished, then DM will not detect this sqc again. // process for DM, mark sqc finished, then DM will not detect this sqc again.
if (OB_NOT_NULL(edge->get_detect_cb())) { if (OB_NOT_NULL(edge->get_detect_cb())) {
#ifdef ERRSIM #ifdef ERRSIM
if (OB_FAIL(OB_E(EventTable::EN_PX_SLOW_PROCESS_SQC_FINISH_MSG) OB_SUCCESS)) { int ecode = EventTable::EN_PX_SLOW_PROCESS_SQC_FINISH_MSG;
if (OB_SUCCESS != ecode && OB_SUCC(ret)) {
LOG_WARN("qc slow process sqc finish msg by desgin", K(ret)); LOG_WARN("qc slow process sqc finish msg by desgin", K(ret));
usleep(100 * 1000L); usleep(100 * 1000L);
ret = OB_SUCCESS;
} }
#endif #endif
int set_finish_ret = edge->get_detect_cb()->atomic_set_finished(sqc->get_sqc_addr()); int set_finish_ret = edge->get_detect_cb()->atomic_set_finished(sqc->get_sqc_addr());

View File

@ -521,7 +521,8 @@ int ObPxSQCProxy::report(int end_ret) const
if (OB_SUCC(ret)) { if (OB_SUCC(ret)) {
int64_t query_timeout = 0; int64_t query_timeout = 0;
session->get_query_timeout(query_timeout); session->get_query_timeout(query_timeout);
if (OB_FAIL(OB_E(EventTable::EN_PX_SQC_NOT_REPORT_TO_QC, query_timeout) OB_SUCCESS)) { int ecode = EVENT_CALL(EventTable::EN_PX_SQC_NOT_REPORT_TO_QC, query_timeout);
if (OB_SUCCESS != ecode && OB_SUCC(ret)) {
static bool errsim = false; static bool errsim = false;
errsim = !errsim; errsim = !errsim;
if (errsim) { if (errsim) {