diff --git a/src/rootserver/ddl_task/ob_column_redefinition_task.cpp b/src/rootserver/ddl_task/ob_column_redefinition_task.cpp index 36070951d6..be8721694c 100644 --- a/src/rootserver/ddl_task/ob_column_redefinition_task.cpp +++ b/src/rootserver/ddl_task/ob_column_redefinition_task.cpp @@ -327,9 +327,10 @@ int ObColumnRedefinitionTask::copy_table_indexes() } else if (OB_ISNULL(index_schema)) { ret = OB_ERR_SYS; LOG_WARN("error sys, index schema must not be nullptr", K(ret), K(tenant_id_), K(index_ids.at(i))); - } else if (index_schema->can_read_index()) { - // index is already built + } else if (is_final_index_status(index_schema->get_index_status())) { + // index status is final need_rebuild_index = false; + LOG_INFO("index status is final", K(ret), K(task_id_), K(index_id), K(need_rebuild_index)); } else { create_index_arg.index_type_ = index_schema->get_index_type(); ObCreateDDLTaskParam param(tenant_id_, diff --git a/src/rootserver/ddl_task/ob_ddl_task.cpp b/src/rootserver/ddl_task/ob_ddl_task.cpp index 961367db6d..70d68938fe 100644 --- a/src/rootserver/ddl_task/ob_ddl_task.cpp +++ b/src/rootserver/ddl_task/ob_ddl_task.cpp @@ -947,12 +947,15 @@ int ObDDLTask::switch_status(const ObDDLTaskStatus new_status, const bool enable const ObDDLTaskStatus old_status = task_status_; const bool error_need_retry = OB_SUCCESS != ret_code && is_error_need_retry(ret_code); if (OB_TMP_FAIL(check_ddl_task_is_cancel(trace_id_, is_cancel))) { - LOG_WARN("check ddl task is cancel failed", K(tmp_ret), K_(trace_id)); + LOG_WARN("check ddl task is cancel failed", K(tmp_ret), K(task_id_), K(parent_task_id_), K_(trace_id)); } if (is_cancel) { real_ret_code = (OB_SUCCESS == ret_code || error_need_retry) ? OB_CANCELED : ret_code; + FLOG_INFO("ddl task is canceled", K(task_id_), K(parent_task_id_), K(object_id_), + K(target_object_id_), K(ret_code), K(error_need_retry), K(real_ret_code)); } else if (SUCCESS == old_status || error_need_retry) { - 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_)); + LOG_INFO("error code found, but execute again", K(task_id_), K(parent_task_id_), + K(ret_code), K(ret_code_), K(old_status), K(new_status), K(err_code_occurence_cnt_)); real_new_status = old_status; real_ret_code = OB_SUCCESS; } @@ -967,12 +970,12 @@ int ObDDLTask::switch_status(const ObDDLTaskStatus new_status, const bool enable LOG_WARN("check if tenant has been dropped failed", K(ret), K(tenant_id_)); } else if (is_tenant_dropped) { need_retry_ = false; - LOG_INFO("tenant has been dropped, exit anyway", K(ret), K(tenant_id_)); + LOG_INFO("tenant has been dropped, exit anyway", K(ret), K(task_id_), K(parent_task_id_), K(tenant_id_)); } else if (OB_FAIL(ObAllTenantInfoProxy::is_standby_tenant(&root_service->get_sql_proxy(), tenant_id_, is_standby_tenant))) { LOG_WARN("check is standby tenant failed", K(ret), K(tenant_id_)); } else if (is_standby_tenant) { need_retry_ = false; - LOG_INFO("tenant is standby, exit anyway", K(ret), K(tenant_id_)); + LOG_INFO("tenant is standby, exit anyway", K(ret), K(task_id_), K(parent_task_id_), K(tenant_id_)); } else if (OB_FAIL(trans.start(&root_service->get_sql_proxy(), tenant_id_))) { LOG_WARN("start transaction failed", K(ret)); } else { diff --git a/src/rootserver/ddl_task/ob_table_redefinition_task.cpp b/src/rootserver/ddl_task/ob_table_redefinition_task.cpp index b809f60c59..d5eefd7920 100755 --- a/src/rootserver/ddl_task/ob_table_redefinition_task.cpp +++ b/src/rootserver/ddl_task/ob_table_redefinition_task.cpp @@ -461,9 +461,10 @@ int ObTableRedefinitionTask::copy_table_indexes() } else if (OB_ISNULL(index_schema)) { ret = OB_ERR_SYS; LOG_WARN("error sys, index schema must not be nullptr", K(ret), K(index_ids.at(i))); - } else if (index_schema->can_read_index()) { - // index is already built + } else if (is_final_index_status(index_schema->get_index_status())) { + // index status is final need_rebuild_index = false; + LOG_INFO("index status is final", K(ret), K(task_id_), K(index_id), K(need_rebuild_index)); } else { create_index_arg.index_type_ = index_schema->get_index_type(); ObCreateDDLTaskParam param(tenant_id_, diff --git a/src/share/ob_ddl_error_message_table_operator.cpp b/src/share/ob_ddl_error_message_table_operator.cpp index 3ca6c3267f..8b6379259e 100644 --- a/src/share/ob_ddl_error_message_table_operator.cpp +++ b/src/share/ob_ddl_error_message_table_operator.cpp @@ -331,7 +331,7 @@ int ObDDLErrorMessageTableOperator::report_ddl_error_message(const ObBuildDDLErr ret = OB_ERR_UNEXPECTED; LOG_WARN("unexpected affected rows", K(ret), K(affected_rows)); } else { - LOG_INFO("process ddl error message report success", K(ret), K(schema_version), K(table_id), K(addr), K(error_message), K(update_sql.ptr())); + LOG_INFO("process ddl error message report success", K(ret), K(task_id), K(schema_version), K(table_id), K(addr), K(error_message), K(update_sql.ptr())); } } return ret;