feat(raft-log-replication): simulator AppendEntries delivery (task 8.2)
raft_sim_deliver_append_entries drains the AE queue, routes each buffered AE to the (non-partitioned) destination via raft_on_append_entries_request, and routes the result back to the source via raft_on_append_entries_reply — mirroring the vote-RPC routing; partitioned endpoints are skipped. Review-applied (HIGH): raft_sim_ae_t now captures the leader's SEND-time term (leader_term) at buffer time and delivery uses it instead of the live source state.term — without this, reorder/churn delivery (9.3/9.4) would inject the wrong term and defeat UpdateTerm/stale-drop (G5). Smoke test asserts replication to a connected follower + isolation of a partitioned one. ASAN green.
This commit is contained in:
parent
eeb95591ae
commit
0e8c6ed05a
4 changed files with 119 additions and 1 deletions
|
|
@ -144,7 +144,8 @@
|
|||
- _Boundary: raft_sim.c_
|
||||
- _Depends: 6.3, 7.2_
|
||||
|
||||
- [ ] 8.2 Add synchronous AppendEntries delivery honoring partitions
|
||||
- [x] 8.2 Add synchronous AppendEntries delivery honoring partitions
|
||||
- NOTE (impl 2026-06-21): `raft_sim_ae_t` now carries `leader_term` captured at SEND time (in `sim_send_append_entries`) and delivery uses `ae->leader_term`, NOT the live source `state.term`. Required so reorder (9.3) and stale-term churn (9.4) deliver the sending-epoch term — using the live term would bypass UpdateTerm/stale-drop and defeat the G5 regression. Caught in review.
|
||||
- Add `raft_sim_deliver_append_entries`: for each buffered AE, call `raft_on_append_entries_request` on the (non-partitioned) destination, then route the reply back via `raft_on_append_entries_reply`; skip partitioned nodes (mirrors the existing vote-RPC routing)
|
||||
- Observable completion: driving one append + delivery replicates the entry to a connected follower; partitioned follower receives nothing
|
||||
- _Requirements: 8.1_
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue