From 907babd5685a947f16831ed69a28cd43800c41d1 Mon Sep 17 00:00:00 2001 From: pe-99y <315053752@qq.com> Date: Thu, 23 May 2024 08:52:10 +0000 Subject: [PATCH] [DAS RETRY] perform statement-level retry when tablet not exists --- src/sql/das/ob_das_retry_ctrl.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/sql/das/ob_das_retry_ctrl.cpp b/src/sql/das/ob_das_retry_ctrl.cpp index 4d3a8a7b0..c8b5e7fe9 100644 --- a/src/sql/das/ob_das_retry_ctrl.cpp +++ b/src/sql/das/ob_das_retry_ctrl.cpp @@ -65,9 +65,10 @@ void ObDASRetryCtrl::tablet_location_retry_proc(ObDASRef &das_ref, } else if (OB_FAIL(table_schema->check_if_tablet_exists(tablet_loc->tablet_id_, tablet_exist))) { LOG_WARN("failed to check if tablet exists", K(ret), K(tablet_loc), K(ref_table_id)); } else if (!tablet_exist) { - // partition could be dropped - task_op.set_errcode(OB_PARTITION_NOT_EXIST); - LOG_WARN("partition not exist, maybe dropped by DDL, stop das retry", K(tablet_loc), K(ref_table_id)); + // partition could be dropped or table could be truncated, in this case we return OB_SCHEMA_EAGAIN and + // attempt statement-level retry + task_op.set_errcode(OB_SCHEMA_EAGAIN); + LOG_WARN("partition not exist, maybe dropped by DDL or table was truncated", K(tablet_loc), K(ref_table_id)); } else { loc_router.force_refresh_location_cache(true, task_op.get_errcode()); need_retry = true;