Handling concurrent situation when table not exist
This commit is contained in:
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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
|
||||
|
||||
Reference in New Issue
Block a user