ddl task not retry error_code is changed to OB_TASK_EXPIRE

This commit is contained in:
coolfishchen
2024-05-13 06:50:44 +00:00
committed by ob-robot
parent 845b8ffe5c
commit aefd04361f
4 changed files with 9 additions and 6 deletions

View File

@ -1461,7 +1461,7 @@ int ObDDLTask::push_execution_id(const uint64_t tenant_id, const int64_t task_id
if (1 == execution_id) {
// has been executed before
if (!ddl_can_retry) {
ret = OB_NOT_SUPPORTED;
ret = OB_TASK_EXPIRED; //task can not be retry
LOG_WARN("do not retry for heap table ddl plan", K(tenant_id), K(task_id), K(ddl_can_retry));
} else {
new_execution_id = 1L;

View File

@ -356,7 +356,7 @@ int ObTableRedefinitionTask::check_ddl_can_retry(const bool ddl_need_retry_at_ex
LOG_WARN("invalid arguments", K(ret), KP(table_schema));
} else if (OB_FAIL(check_use_heap_table_ddl_plan(table_schema))) {
LOG_WARN("check use heap table ddl plan failed", K(ret));
} else if (DDL_MVIEW_COMPLETE_REFRESH == task_type_) {
} else if (data_format_version_ >= DATA_VERSION_4_3_1_0 && DDL_MVIEW_COMPLETE_REFRESH == task_type_) {
is_ddl_retryable_ = false;
} else {
if (ObDDLUtil::use_idempotent_mode(data_format_version_, task_type_)) {
@ -413,6 +413,9 @@ int ObTableRedefinitionTask::table_redefinition(const ObDDLTaskStatus next_task_
} else if (!need_exec_new_inner_sql) {
is_build_replica_end = true;
} else if (OB_FAIL(send_build_replica_request())) {
if (OB_TASK_EXPIRED == ret) {
is_build_replica_end = true;
}
LOG_WARN("fail to send build replica request", K(ret));
} else {
TCWLockGuard guard(lock_);

View File

@ -212,7 +212,7 @@ int ObMViewExecutorUtil::generate_refresh_id(const uint64_t tenant_id, int64_t &
bool ObMViewExecutorUtil::is_mview_refresh_retry_ret_code(int ret_code)
{
return OB_OLD_SCHEMA_VERSION == ret_code || OB_EAGAIN == ret_code ||
OB_INVALID_QUERY_TIMESTAMP == ret_code ||
OB_INVALID_QUERY_TIMESTAMP == ret_code || OB_TASK_EXPIRED == ret_code ||
is_master_changed_error(ret_code) || is_partition_change_error(ret_code) ||
is_ddl_stmt_packet_retry_err(ret_code);
}