Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BugFix] Fix thrift rpc not reopen after failed (backport #49619) #49646

Merged
merged 1 commit into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions be/src/exec/pipeline/audit_statistics_reporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ Status AuditStatisticsReporter::report_audit_statistics(const TReportAuditStatis

rpc_status = Status(res.status);
} catch (TException& e) {
(void)coord.reopen(config::thrift_rpc_timeout_ms);
std::stringstream msg;
msg << "ReportExecStatus() to " << fe_addr << " failed:\n" << e.what();
LOG(WARNING) << msg.str();
Expand Down
2 changes: 2 additions & 0 deletions be/src/exec/pipeline/exec_state_reporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ Status ExecStateReporter::report_exec_status(const TReportExecStatusParams& para

rpc_status = Status(res.status);
} catch (TException& e) {
(void)coord.reopen(config::thrift_rpc_timeout_ms);
std::stringstream msg;
msg << "ReportExecStatus() to " << fe_addr << " failed:\n" << e.what();
LOG(WARNING) << msg.str();
Expand Down Expand Up @@ -293,6 +294,7 @@ Status ExecStateReporter::report_epoch(const TMVMaintenanceTasks& params, ExecEn

rpc_status = Status::OK();
} catch (TException& e) {
(void)coord.reopen(config::thrift_rpc_timeout_ms);
std::stringstream msg;
msg << "mvReport() to " << fe_addr << " failed:\n" << e.what();
LOG(WARNING) << msg.str();
Expand Down
2 changes: 2 additions & 0 deletions be/src/exec/pipeline/query_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,7 @@ void QueryContextManager::report_fragments(

VLOG_ROW << "debug: reportExecStatus params is " << apache::thrift::ThriftDebugString(params).c_str();

// TODO: refactor me
try {
try {
fe_connection->batchReportExecStatus(res, report_batch);
Expand All @@ -652,6 +653,7 @@ void QueryContextManager::report_fragments(
}

} catch (TException& e) {
(void)fe_connection.reopen(config::thrift_rpc_timeout_ms);
std::stringstream msg;
msg << "ReportExecStatus() to " << fe_addr << " failed:\n" << e.what();
LOG(WARNING) << msg.str();
Expand Down
2 changes: 2 additions & 0 deletions be/src/runtime/fragment_mgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ void FragmentExecState::coordinator_callback(const Status& status, RuntimeProfil

rpc_status = Status(res.status);
} catch (TException& e) {
(void)coord.reopen(config::thrift_rpc_timeout_ms);
std::stringstream msg;
msg << "ReportExecStatus() to " << _coord_addr << " failed:\n" << e.what();
LOG(WARNING) << msg.str();
Expand Down Expand Up @@ -763,6 +764,7 @@ void FragmentMgr::report_fragments(const std::vector<TUniqueId>& non_pipeline_ne
}

} catch (TException& e) {
(void)fe_connection.reopen(config::thrift_rpc_timeout_ms);
std::stringstream msg;
msg << "ReportExecStatus() to " << fragment_exec_state->coord_addr() << " failed:\n" << e.what();
LOG(WARNING) << msg.str();
Expand Down
Loading