This is an automated email from the ASF dual-hosted git repository. zhangstar333 pushed a commit to branch doris_master_new in repository https://gitbox.apache.org/repos/asf/doris.git
commit a6624a887cf33022db393594a104e8c843ff0bc6 Author: zhangstar333 <[email protected]> AuthorDate: Thu Jun 11 23:26:47 2026 +0800 update brpc retry count --- be/src/util/brpc_client_cache.h | 10 +++++----- fe/fe-core/src/main/java/org/apache/doris/system/Backend.java | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/be/src/util/brpc_client_cache.h b/be/src/util/brpc_client_cache.h index 7d767b4a077..ee70f206ab0 100644 --- a/be/src/util/brpc_client_cache.h +++ b/be/src/util/brpc_client_cache.h @@ -228,15 +228,15 @@ public: // Explicit-override entry point. Pass `enable_handshake=true` to force the // handshake-and-retry path (paid only on cache miss / rebuild — warm cache - // hits stay free). Pass `false` to disable. Max attempts is 3. + // hits stay free). Pass `false` to disable. Max attempts is 5. std::shared_ptr<T> get_client(const std::string& host, int port, bool enable_handshake) { - const int max_attempts = enable_handshake ? 3 : 1; + const int max_attempts = enable_handshake ? 5 : 1; std::string host_port; for (int attempt = 1; attempt <= max_attempts; ++attempt) { - // Brief backoff before retries so the new Pod has time to start - // listening. Only paid during graceful restart (enable_handshake). + // Progressive backoff before retries so Kubernetes DNS/endpoints + // have more time to converge during graceful restart. if (enable_handshake && attempt > 1) { - bthread_usleep(500000); + bthread_usleep(1000000 * (attempt - 1)); } std::string realhost = host; auto dns_cache = ExecEnv::GetInstance()->dns_cache(); diff --git a/fe/fe-core/src/main/java/org/apache/doris/system/Backend.java b/fe/fe-core/src/main/java/org/apache/doris/system/Backend.java index ffcca0f6f53..33e03fee7ec 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/system/Backend.java +++ b/fe/fe-core/src/main/java/org/apache/doris/system/Backend.java @@ -161,7 +161,7 @@ public class Backend implements Writable { // No need to persist, because only master FE handle heartbeat. private int heartbeatFailureCounter = 0; - private static final int GRACEFUL_ALIVE_HEARTBEAT_CONFIRM_COUNT = 3; + private static final int GRACEFUL_ALIVE_HEARTBEAT_CONFIRM_COUNT = 5; private int gracefulAliveHeartbeatOkCount = 0; private long gracefulAliveHeartbeatStartTime = -1; --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
