Skip to content

Commit

Permalink
[fix](thrift exception) do not log in thrift exception in asan mode
Browse files Browse the repository at this point in the history
  • Loading branch information
dataroaring committed May 25, 2024
1 parent 5660825 commit c3f90d9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions be/src/agent/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@ Status MasterServerClient::confirm_unused_remote_files(
try {
client->confirmUnusedRemoteFiles(*result, request);
} catch (TTransportException& e) {
#ifdef ADDRESS_SANITIZER
return Status::RpcError<false>("Master client confirm_unused_remote_files failed due to {}",
e.what());
#else
TTransportException::TTransportExceptionType type = e.getType();
if (type != TTransportException::TTransportExceptionType::TIMED_OUT) {
// if not TIMED_OUT, retry
Expand All @@ -209,6 +213,7 @@ Status MasterServerClient::confirm_unused_remote_files(
_master_info.network_address.hostname, _master_info.network_address.port,
client_status.code(), e.what());
}
#endif
}
} catch (std::exception& e) {
RETURN_IF_ERROR(client.reopen(config::thrift_rpc_timeout_ms));
Expand Down
8 changes: 8 additions & 0 deletions be/src/runtime/fragment_mgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,13 @@ void FragmentMgr::coordinator_callback(const ReportStatusRequest& req) {
try {
coord->reportExecStatus(res, params);
} catch (TTransportException& e) {
#ifdef ADDRESS_SANITIZER
rpc_status =
Status::RpcError<false>("Master client confirm_unused_remote_files failed due to {}",
e.what());
req.cancel_fn(rpc_status);
return;
#else
LOG(WARNING) << "Retrying ReportExecStatus. query id: " << print_id(req.query_id)
<< ", instance id: " << print_id(req.fragment_instance_id) << " to "
<< req.coord_addr << ", err: " << e.what();
Expand All @@ -451,6 +458,7 @@ void FragmentMgr::coordinator_callback(const ReportStatusRequest& req) {
return;
}
coord->reportExecStatus(res, params);
#endif
}

rpc_status = Status::create<false>(res.status);
Expand Down

0 comments on commit c3f90d9

Please sign in to comment.