Repository navigation
Description
Follow-up to #5291, but a distinct defect — filing separately per the pattern of the previous reports. On 26.8.1-SNAPSHOT (digest 8ee87c28…, all 3 nodes): the new stuck-diverged self-reformat fires correctly, but the rejoin after it never completes — the follower ends up RUNNING and leader-aware with matchIndex: -1 forever (not even the term's CONFIGURATIONENTRY gets appended), while the leader's status API reports it HEALTHY. No errors on either side; readiness 503 indefinitely.
Sequence (UTC, 2026-07-15 — same cluster as #5291, immediately after its full parallel reformat)
-
~09:29 — full parallel reformat to escape the HA: follower crash-loops every 3s on 'Failed updateLastAppliedTermIndex: newTI (t:3) < oldTI (t:4)' after pod recreation — CLOSED-member auto-restart loops forever, divergedFollowerRecovery never triggers #5291 crash loop: wipe
raftStorageDirectoryon all 3 nodes + simultaneous--grace-period=0 --forcedelete. Caveat that set up this scenario:arcadedb-0was in the HA: follower crash-loops every 3s on 'Failed updateLastAppliedTermIndex: newTI (t:3) < oldTI (t:4)' after pod recreation — CLOSED-member auto-restart loops forever, divergedFollowerRecovery never triggers #5291 3-second crash-restart loop when the wipe ran, and the in-place member restart re-persisted the storage between therm -rfand the SIGKILL — so while pods 1/2 came back clean and bootstrapped a fresh group (term=5, commitIndex=-1),arcadedb-0came back with resurrected pre-wipe state (appliedTerm=4, appliedIndex=4967). -
09:33:40 — the new HealthMonitor correctly detects it:
WARNI [HealthMonitor] Follower stuck-diverged from leader for 60011ms, reformatting Raft storage and rejoining (attempt 1) WARNI [RaftHAServer] Follower stuck at a stale term (currentTerm=5, appliedTerm=4, appliedIndex=4967, commitIndex=4967); reformatting Raft storage and rejoining so the leader can reconcile it via snapshot-install.👏 — this is exactly the classification we asked for in HA: follower crash-loops every 3s on 'Failed updateLastAppliedTermIndex: newTI (t:3) < oldTI (t:4)' after pod recreation — CLOSED-member auto-restart loops forever, divergedFollowerRecovery never triggers #5291, and it works for the stale-term case.
-
09:33:40.392 — during the reformat restart, the leader's in-flight append of the configuration entry is cancelled (expected, the member is restarting):
WARNI [GrpcServerProtocolService] APPEND_ENTRIES onError, lastRequest: ...arcadedb-2..._2434 -> ...arcadedb-0..._2434#1-t5, previous=<PROTO_DEFAULT>, leaderCommit=-1, entries: size=1, first=(t:5, i:0), CONFIGURATIONENTRY(...): CANCELLED: client cancelled -
09:33:41-42 — the reformatted node comes up and sees the cluster:
INFO [ArcadeStateMachine] ArcadeStateMachine initialized (groupId=group-E6A6271798FD) INFO [ArcadeStateMachine] Leader elected: vcc-superx-arcadedb-2 (...) (term=5) INFO [RaftHAServer] RaftClient refreshed with fresh gRPC channels after leader change -
Then nothing, ever. 5+ minutes of total silence on the node (no bootstrap, no resync, no snapshot, no errors); readiness stays 503.
State of both sides while stuck
arcadedb-0 (the limbo node) /api/v1/cluster:
{"localPeerId":"...arcadedb-0..._2434","raftState":"RUNNING","isLeader":false,
"leaderId":"...arcadedb-2..._2434","leaderHttpAddress":"...arcadedb-2...:2480","electionCount":1, ...}Leader (arcadedb-2) /api/v1/cluster peer telemetry:
{"id":"...arcadedb-0...","role":"FOLLOWER","matchIndex":-1,"replicationLag":-1,"replicaStatus":"HEALTHY"}
{"id":"...arcadedb-1...","role":"FOLLOWER","matchIndex":2,"replicationLag":0,"replicaStatus":"HEALTHY"}matchIndex: -1 after 5 minutes means the leader has never successfully appended anything to this follower — not even entry (t:5, i:0). The appender's retry after the CANCELLED at 09:33:40 either never happened or fails silently (nothing in the leader's log about arcadedb-0 after that line). DNS/network are fine (same pods, stable IPs since 09:30; the node's own RaftClient reached the leader to learn leaderId).
Asks
- After the stuck-diverged reformat restarts the member, make sure the leader-side appender re-engages (the cancelled in-flight append seems to kill it — same "dead appender" family as the earlier reports, now triggered by the recovery path itself).
replicaStatus: HEALTHYwithmatchIndex: -1/replicationLag: -1after minutes is the third distinct incident where the status API masked a dead replication path (crash-looping node yesterday, non-member before that, never-appended now). Suggest: any follower without a successful append in N seconds must not be HEALTHY.- The stuck-diverged reformat says "(attempt 1)" — but no attempt 2 ever fired despite the node remaining leaderless-in-effect (matchIndex -1) for 5+ minutes. If the post-reformat rejoin doesn't complete within a window, the monitor should retry or escalate.
Recovery
Will attempt a leadership transfer (fresh appenders) and report back; the full parallel reformat obviously also clears it but costs a full outage each time.
Activity
ruispereira commentedon Jul 15, 2026
Recovery confirmed — and it validates the diagnosis. A leadership transfer to the other healthy follower (
POST /api/v1/cluster/leaderwith{"peerId": ...}) recovered the limbo node in seconds: the new leader's fresh appenders immediately replicated to it (matchIndex -1 → 4, level with the other follower) and it went Ready. So the blocker was purely the old leader's dead appender, killed by the CANCELLED in-flight append during the self-reformat restart and never recreated.Two extra data points:
{"result":"Leadership transferred to ...", "leaderId": ...}) — so the POST /api/v1/cluster/leader: NPE (500) on missing body, and success response when leadership did not actually transfer #5276 fix is present in this snapshot digest (8ee87c28…). Which means the build skew question in HA: follower crash-loops every 3s on 'Failed updateLastAppliedTermIndex: newTI (t:3) < oldTI (t:4)' after pod recreation — CLOSED-member auto-restart loops forever, divergedFollowerRecovery never triggers #5291 cuts the other way: if POST /api/v1/cluster/leader: NPE (500) on missing body, and success response when leadership did not actually transfer #5276's commit is in, the allowlist rejections and the give-up behaviour we logged there were probably observed on a build that also has the HA/k8s: recreated follower permanently stranded — one-shot KubernetesAutoJoin rejected by stale PeerAddressAllowlistFilter; leader never re-contacts it (follow-up to #4696) #5268 fixes — worth double-checking why re-resolve-on-miss didn't take effect in that trace.fix(#5295): flag a never-appended follower (matchIndex=-1) as STALLED…
Merge #5295: flag never-appended follower (matchIndex=-1) as STALLED …
lvca commentedon Jul 15, 2026
Fixed in
main.You nailed the diagnosis. The real defect was on the leader: the cluster monitor decided a follower's health purely from its numeric replication lag. When the group had only committed a couple of entries, a follower stuck at
matchIndex=-1(never received a single append) had a lag small enough to fall under the warning threshold, so it was reportedHEALTHY. That same threshold also gated the two existing self-healing paths, so neither of them ever kicked in.The monitor now treats "never appended anything while the leader has committed entries" as a dead replication path regardless of how small the lag looks: after a short grace (to not flag a follower that's simply mid-join or mid-snapshot) it reports the follower
STALLEDand triggers the leader to force a resync automatically. A follower that starts replicating within the grace is never flagged.Two notes:
STALLEDstatus now says so explicitly instead of hiding the problem behindHEALTHY.Available in the next
26.8.1-SNAPSHOTbuild.❤️ Thanks for helping make ArcadeDB better! ArcadeDB is free and open source, sustained by its community. If it's useful to you or your company, please consider becoming a sponsor to keep development going.
fix(#5295): flag a never-appended follower (matchIndex=-1) as STALLED…
address review: leave never-appended replicas to their own #5295 rule…