This is an automated email from the ASF dual-hosted git repository. w41ter 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 87a984820db [fix](client) Do not log in thrift exception when ADDRESS_SANITIZER is defined (#48347) 87a984820db is described below commit 87a984820dbf537d8237346587336204a28c31dc Author: walter <maoch...@selectdb.com> AuthorDate: Wed Feb 26 15:24:06 2025 +0800 [fix](client) Do not log in thrift exception when ADDRESS_SANITIZER is defined (#48347) Logging in thrift exception will cause BE crash when ADDRESS_SANITIZER is defined. But PR #36808 uses the opposite condition, causing logging to be turned on only in ADDRESS_SANITIZER enabled. --- be/src/agent/utils.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/be/src/agent/utils.cpp b/be/src/agent/utils.cpp index 2a1f9994b01..c5653a02792 100644 --- a/be/src/agent/utils.cpp +++ b/be/src/agent/utils.cpp @@ -91,12 +91,12 @@ Status MasterServerClient::finish_task(const TFinishTaskRequest& request, TMaste try { client->finishTask(*result, request); } catch ([[maybe_unused]] TTransportException& e) { -#ifdef ADDRESS_SANITIZER +#ifndef ADDRESS_SANITIZER LOG(WARNING) << "master client, retry finishTask: " << e.what(); #endif client_status = client.reopen(config::thrift_rpc_timeout_ms); if (!client_status.ok()) { -#ifdef ADDRESS_SANITIZER +#ifndef ADDRESS_SANITIZER LOG(WARNING) << "fail to get master client from cache. " << "host=" << _cluster_info->master_fe_addr.hostname << ", port=" << _cluster_info->master_fe_addr.port @@ -136,14 +136,14 @@ Status MasterServerClient::report(const TReportRequest& request, TMasterResult* } catch (TTransportException& e) { TTransportException::TTransportExceptionType type = e.getType(); if (type != TTransportException::TTransportExceptionType::TIMED_OUT) { -#ifdef ADDRESS_SANITIZER +#ifndef ADDRESS_SANITIZER // if not TIMED_OUT, retry LOG(WARNING) << "master client, retry finishTask: " << e.what(); #endif client_status = client.reopen(config::thrift_rpc_timeout_ms); if (!client_status.ok()) { -#ifdef ADDRESS_SANITIZER +#ifndef ADDRESS_SANITIZER LOG(WARNING) << "fail to get master client from cache. " << "host=" << _cluster_info->master_fe_addr.hostname << ", port=" << _cluster_info->master_fe_addr.port @@ -156,7 +156,7 @@ Status MasterServerClient::report(const TReportRequest& request, TMasterResult* } else { // TIMED_OUT exception. do not retry // actually we don't care what FE returns. -#ifdef ADDRESS_SANITIZER +#ifndef ADDRESS_SANITIZER LOG(WARNING) << "fail to report to master: " << e.what(); #endif return Status::InternalError("Fail to report to master"); @@ -192,8 +192,10 @@ Status MasterServerClient::confirm_unused_remote_files( } catch (TTransportException& e) { TTransportException::TTransportExceptionType type = e.getType(); if (type != TTransportException::TTransportExceptionType::TIMED_OUT) { +#ifndef ADDRESS_SANITIZER // if not TIMED_OUT, retry LOG(WARNING) << "master client, retry finishTask: " << e.what(); +#endif client_status = client.reopen(config::thrift_rpc_timeout_ms); if (!client_status.ok()) { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org