Gabriel39 commented on code in PR #68667:
URL: https://github.com/apache/doris/pull/68667#discussion_r4151951175
##########
fe/fe-core/src/main/java/org/apache/doris/system/Backend.java:
##########
@@ -959,6 +970,12 @@ public boolean handleHbResponse(BackendHbResponse
hbResponse, boolean isReplay)
this.nextForceEditlogHeartbeatTime =
System.currentTimeMillis() + delaySecond * 1000L;
}
} else {
+ // A restarted BE may have been downgraded. Do not reuse its old
capability
+ // while heartbeat failures are still within the liveness
tolerance.
+ if (arrowFlightNativeVariantSupported) {
Review Comment:
Fixed by preserving the existing heartbeat journal contract: capability now
follows the last successful report during tolerated misses and is cleared
inside the threshold/replay death branch. A tolerated BAD no longer creates a
capability-only journal entry, so followers stay alive with the leader.
Successful unsupported or legacy reports still clear support.
A separate replay flag would not fix replay on older FEs, where every
journaled BAD already means death. Heartbeats also cannot make an in-place
downgrade atomic; the documentation now explicitly requires stopping new native
queries and draining outstanding tickets before downgrade.
Added leader/follower replay tests covering tolerances 0/1/3, capability
on/off, misses through death, recovery and a legacy omitted capability. The
original code reproduced leader-alive/follower-dead after the first tolerated
miss; the corrected tests pass. A complete PR review also found and fixed
scoped-session metadata concurrency and shared-dictionary output amplification,
with additional regressions. Local validation: 50 BE tests, 11 FE tests,
Checkstyle and clang-format 16 passed. Full cluster integration execution
remains for CI.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]