This is an automated email from the ASF dual-hosted git repository. dataroaring pushed a commit to branch branch-3.0 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.0 by this push: new 4757dadad5b branch-3.0: [fix](heartbeat) avoid failure immediately due to connection reset #48444 (#48634) 4757dadad5b is described below commit 4757dadad5b210c1e7b62c2f910c0e8fef5e0417 Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> AuthorDate: Mon Mar 10 15:53:30 2025 +0800 branch-3.0: [fix](heartbeat) avoid failure immediately due to connection reset #48444 (#48634) Cherry-picked from #48444 Co-authored-by: Yongqiang YANG <yangyongqi...@selectdb.com> --- .../src/main/java/org/apache/doris/system/HeartbeatMgr.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/fe/fe-core/src/main/java/org/apache/doris/system/HeartbeatMgr.java b/fe/fe-core/src/main/java/org/apache/doris/system/HeartbeatMgr.java index f8e75633a0d..036efd05d79 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/system/HeartbeatMgr.java +++ b/fe/fe-core/src/main/java/org/apache/doris/system/HeartbeatMgr.java @@ -238,6 +238,15 @@ public class HeartbeatMgr extends MasterDaemon { @Override public HeartbeatResponse call() { + HeartbeatResponse response = pingOnce(); + // We ping twice here to avoid immediately failure due to connection reset. + if (response.getStatus() != HbStatus.OK) { + response = pingOnce(); + } + return response; + } + + private HeartbeatResponse pingOnce() { long backendId = backend.getId(); HeartbeatService.Client client = null; --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org