diff --git a/src/rootserver/ob_ddl_service.cpp b/src/rootserver/ob_ddl_service.cpp index 258459a977..846b0692a0 100644 --- a/src/rootserver/ob_ddl_service.cpp +++ b/src/rootserver/ob_ddl_service.cpp @@ -16149,6 +16149,12 @@ int ObDDLService::check_db_and_table_is_exist(const obrpc::ObTruncateTableArg &a LOG_WARN("truncate oracle tmp table not supported", KR(ret), K(tenant_id), K(table_name), K(database_name)); } + } else if (OB_FAIL(ret) && OB_ITER_END == ret) { + ret = OB_TABLE_NOT_EXIST; + LOG_WARN("can not find table", + KR(ret), K(tenant_id), K(table_name), K(database_name)); + LOG_USER_ERROR(OB_TABLE_NOT_EXIST, to_cstring(database_name), + to_cstring(table_name)); } } } diff --git a/src/share/ob_debug_sync_point.h b/src/share/ob_debug_sync_point.h index 9543071c6c..3f07f40735 100644 --- a/src/share/ob_debug_sync_point.h +++ b/src/share/ob_debug_sync_point.h @@ -458,6 +458,7 @@ class ObString; ACT(MEMBERLIST_CHANGE_MEMBER,)\ ACT(BEFORE_CHECK_CLEAN_DRTASK,)\ ACT(BEFORE_UNIQ_TASK_RUN,)\ + ACT(BEFORE_PARELLEL_TRUNCATE,)\ ACT(MAX_DEBUG_SYNC_POINT,) DECLARE_ENUM(ObDebugSyncPoint, debug_sync_point, OB_DEBUG_SYNC_POINT_DEF); diff --git a/src/sql/engine/cmd/ob_table_executor.cpp b/src/sql/engine/cmd/ob_table_executor.cpp index ab824fff83..1f24d4daa7 100644 --- a/src/sql/engine/cmd/ob_table_executor.cpp +++ b/src/sql/engine/cmd/ob_table_executor.cpp @@ -53,6 +53,7 @@ #include "share/backup/ob_backup_io_adapter.h" #include "share/external_table/ob_external_table_file_rpc_processor.h" #include "share/external_table/ob_external_table_utils.h" +#include "share/ob_debug_sync.h" namespace oceanbase { using namespace common; @@ -2081,6 +2082,7 @@ int ObTruncateTableExecutor::execute(ObExecContext &ctx, ObTruncateTableStmt &st } else { int64_t start_time = ObTimeUtility::current_time(); while (OB_SUCC(ret)) { + DEBUG_SYNC(BEFORE_PARELLEL_TRUNCATE); if (OB_FAIL(common_rpc_proxy->truncate_table_v2(truncate_table_arg, res))) { LOG_WARN("rpc proxy truncate table failed", K(ret)); if ((OB_TRY_LOCK_ROW_CONFLICT == ret || OB_TIMEOUT == ret || OB_NOT_MASTER == ret