forked from lei.chen/myxce
vote_reply_dispatch passed the compressed, self-excluded local votes_idx (vctx->peer_idx, set by raft_cb_send_vote_request's absolute->local remap) straight through to raft_on_vote_reply, which indexes vote_replies[] in ABSOLUTE cluster space -- the same space raft_start_election's self-mark and per-peer send loop use. For a 3-node cluster's middle node (self_idx=1), the peer at absolute index 2 compresses to votes_idx=1, colliding with vote_replies[self_idx=1] -- the slot raft_start_election already marked for the self-vote. The library's per-peer dedup guard then silently drops the genuine reply as a duplicate, so votes_granted never reaches quorum even though the peer granted. Peer 0 is unaffected (compressed index equals absolute), which is why sequential elections and prior soak runs never surfaced this -- only a middle-priority node losing its higher-priority peer and depending on its lower peer's vote hits the collision. Fixed by routing through ha_repl_ack_abs_peer_idx (already existed, already unit-tested, already used for the analogous heartbeat-ACK path) before calling raft_on_vote_reply. ha_record_vote_reply immediately above is unchanged -- it correctly wants the compressed index for ctx->votes[]. Confirmed pre_vote_reply_dispatch needs no equivalent fix: its send path already stores the absolute index. New regression test drives a real 3-node election end-to-end through the actual decode/dispatch path (not the test-hook bypass every other real-vote test in this file uses): Expected 2 Was 1 pre-fix, GREEN post-fix. Full 79-group suite: zero new failures. 10-round --chaotic HA soak: zero committed divergence, zero committed job loss. |
||
|---|---|---|
| .. | ||
| hooks | ||
| anatomy.md | ||
| buglog.json | ||
| cerebrum.md | ||
| config.json | ||
| cron-manifest.json | ||
| cron-state.json | ||
| daemon.log | ||
| designqc-report.json | ||
| identity.md | ||
| memory.md | ||
| OPENWOLF.md | ||
| reframe-frameworks.md | ||
| suggestions.json | ||
| token-ledger.json | ||