This is an automated email from the ASF dual-hosted git repository. dataroaring pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new 7a6c0b1b478 [chore](thrift exception) do not log message in thrift exception (#34994) 7a6c0b1b478 is described below commit 7a6c0b1b478387fea6c152173b9107acb4bb94c7 Author: Yongqiang YANG <98214048+dataroar...@users.noreply.github.com> AuthorDate: Fri May 17 15:43:15 2024 +0800 [chore](thrift exception) do not log message in thrift exception (#34994) --- be/src/agent/utils.cpp | 10 +++++++++- be/src/util/thrift_rpc_helper.cpp | 5 +++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/be/src/agent/utils.cpp b/be/src/agent/utils.cpp index 25217497686..c6a801c7a93 100644 --- a/be/src/agent/utils.cpp +++ b/be/src/agent/utils.cpp @@ -90,6 +90,9 @@ Status MasterServerClient::finish_task(const TFinishTaskRequest& request, TMaste try { client->finishTask(*result, request); } catch (TTransportException& e) { +#ifdef ADDRESS_SANITIZER + return Status::RpcError<false>("Master client finish task failed due to {}", e.what()); +#else LOG(WARNING) << "master client, retry finishTask: " << e.what(); client_status = client.reopen(config::thrift_rpc_timeout_ms); if (!client_status.ok()) { @@ -97,9 +100,10 @@ Status MasterServerClient::finish_task(const TFinishTaskRequest& request, TMaste << "host=" << _master_info.network_address.hostname << ", port=" << _master_info.network_address.port << ", code=" << client_status.code(); - return Status::InternalError("Master client finish task failed"); + return Status::RpcError("Master client finish task failed"); } client->finishTask(*result, request); +#endif } } catch (std::exception& e) { RETURN_IF_ERROR(client.reopen(config::thrift_rpc_timeout_ms)); @@ -129,6 +133,9 @@ Status MasterServerClient::report(const TReportRequest& request, TMasterResult* try { client->report(*result, request); } catch (TTransportException& e) { +#ifdef ADDRESS_SANITIZER + return Status::RpcError<false>("Master client report failed due to {}", e.what()); +#else TTransportException::TTransportExceptionType type = e.getType(); if (type != TTransportException::TTransportExceptionType::TIMED_OUT) { // if not TIMED_OUT, retry @@ -150,6 +157,7 @@ Status MasterServerClient::report(const TReportRequest& request, TMasterResult* LOG(WARNING) << "fail to report to master: " << e.what(); return Status::InternalError("Fail to report to master"); } +#endif } } catch (std::exception& e) { RETURN_IF_ERROR(client.reopen(config::thrift_rpc_timeout_ms)); diff --git a/be/src/util/thrift_rpc_helper.cpp b/be/src/util/thrift_rpc_helper.cpp index 5d11cc6abb1..77e7f377658 100644 --- a/be/src/util/thrift_rpc_helper.cpp +++ b/be/src/util/thrift_rpc_helper.cpp @@ -75,8 +75,9 @@ Status ThriftRpcHelper::rpc(const std::string& ip, const int32_t port, } catch (apache::thrift::transport::TTransportException& e) { std::cerr << "thrift error, reason=" << e.what(); #ifdef ADDRESS_SANITIZER - return Status::RpcError("failed to call frontend service, FE address={}:{}, reason: {}", - ip, port, e.what()); + return Status::RpcError<false>( + "failed to call frontend service, FE address={}:{}, reason: {}", ip, port, + e.what()); #else LOG(WARNING) << "retrying call frontend service after " << config::thrift_client_retry_interval_ms << " ms, address=" << address --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org