From 16428a2609375bd07b99d4259c143074db65f804 Mon Sep 17 00:00:00 2001 From: obdev Date: Thu, 9 Feb 2023 18:16:23 +0000 Subject: [PATCH] fix the core of ObAsyncRpcProxy::wait when executing memory error injection --- src/share/rpc/ob_async_rpc_proxy.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/share/rpc/ob_async_rpc_proxy.h b/src/share/rpc/ob_async_rpc_proxy.h index 0c967d6778..186fd7e35e 100644 --- a/src/share/rpc/ob_async_rpc_proxy.h +++ b/src/share/rpc/ob_async_rpc_proxy.h @@ -414,8 +414,13 @@ int ObAsyncRpcProxy::wait( } else { const int rc = cb->get_ret_code(); if (common::OB_SUCCESS != rc) { - RPC_LOG(WARN, "execute rpc failed", K(rc), "server", cb->get_dst(), "timeout", cb->get_timeout(), - "packet code", PC, "arg", args_.at(index)); + if (index <= (args_.count() -1)) { + RPC_LOG(WARN, "execute rpc failed", K(rc), "server", cb->get_dst(), "timeout", cb->get_timeout(), + "packet code", PC, "arg", args_.at(index)); + } else { + RPC_LOG(WARN, "execute rpc failed and args_ count is not correct", K(rc), "server", cb->get_dst(), "timeout", cb->get_timeout(), + "packet code", PC, K(args_.count()), K(index)); + } } if (NULL != return_code_array) { if (OB_FAIL(return_code_array->push_back(rc))) {