From 4bd0c6351a6f3b4ec075ddd6c07e1f1418f48ea4 Mon Sep 17 00:00:00 2001 From: obdev Date: Mon, 2 Jan 2023 12:38:27 +0000 Subject: [PATCH] purge timeout is not suitable --- src/rootserver/ob_root_service.cpp | 3 ++- src/sql/engine/cmd/ob_tenant_executor.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/rootserver/ob_root_service.cpp b/src/rootserver/ob_root_service.cpp index 553099313..70afaa351 100644 --- a/src/rootserver/ob_root_service.cpp +++ b/src/rootserver/ob_root_service.cpp @@ -9545,7 +9545,8 @@ int ObRootService::purge_recyclebin_objects(int64_t purge_each_time) while (OB_SUCC(ret) && in_service() && purge_sum > 0) { int64_t start_time = ObTimeUtility::current_time(); arg.purge_num_ = purge_sum > PURGE_EACH_RPC ? PURGE_EACH_RPC : purge_sum; - if (OB_FAIL(common_proxy_.purge_expire_recycle_objects(arg, affected_rows))) { + // replcace timeout from hardcode 9s to 10 * GCONF.rpc_timeout + if (OB_FAIL(common_proxy_.timeout(10 * GCONF.rpc_timeout).purge_expire_recycle_objects(arg, affected_rows))) { LOG_WARN("purge reyclebin objects failed", KR(ret), K(current_time), K(expire_time), K(affected_rows), K(arg)); } else { diff --git a/src/sql/engine/cmd/ob_tenant_executor.cpp b/src/sql/engine/cmd/ob_tenant_executor.cpp index 8b9fde945..871b83d8b 100644 --- a/src/sql/engine/cmd/ob_tenant_executor.cpp +++ b/src/sql/engine/cmd/ob_tenant_executor.cpp @@ -832,7 +832,8 @@ int ObPurgeRecycleBinExecutor::execute(ObExecContext &ctx, ObPurgeRecycleBinStmt //一个租户只purge 10个回收站的对象,防止卡住RS的ddl线程 //每次返回purge的行数,只有purge数目少于affected_rows int64_t start_time = ObTimeUtility::current_time(); - if (OB_FAIL(common_rpc_proxy->purge_expire_recycle_objects(purge_recyclebin_arg, affected_rows))) { + // replcace timeout from hardcode 9s to 10 * GCONF.rpc_timeout + if (OB_FAIL(common_rpc_proxy->timeout(10 * GCONF.rpc_timeout).purge_expire_recycle_objects(purge_recyclebin_arg, affected_rows))) { LOG_WARN("purge reyclebin objects failed", K(ret), K(affected_rows), K(purge_recyclebin_arg)); //如果失败情况下,不需要继续 is_tenant_finish = false;