fix ddl retry error code

This commit is contained in:
obdev
2022-10-26 10:18:39 +08:00
committed by wangzelin.wzl
parent b73efa85ae
commit b5be94cf15
11 changed files with 31 additions and 12 deletions

View File

@ -294,8 +294,7 @@ int ObDDLTask::switch_status(ObDDLTaskStatus new_status, const int ret_code)
LOG_WARN("check task is canceled", K(tmp_ret), K(trace_id_));
} else if (is_cancel) {
real_ret_code = OB_SUCCESS == ret_code ? OB_CANCELED : ret_code;
} else if (SUCCESS == old_status || (OB_SUCCESS != ret_code && (ObIDDLTask::error_need_retry(ret_code)
|| (!ObIDDLTask::error_need_retry(ret_code) && MAX_ERR_TOLERANCE_CNT > ++err_code_occurence_cnt_)))) {
} else if (SUCCESS == old_status || (OB_SUCCESS != ret_code && is_error_need_retry(ret_code))) {
LOG_INFO("error code found, but execute again", K(ret_code), K(ret_code_), K(old_status), K(new_status), K(err_code_occurence_cnt_));
ret_code_ = OB_SUCCESS;
new_status = old_status;