docs(raft-adapter-conformance): document dormant AppendEntries sender + non-regression guard
ha_cb_send_append_entries_stub's doc-comment now plainly states it is reachable only via raft_send_append_entries (zero production callers, grep-confirmed), and names repl_broadcast/ha_stream_wal_to_standby as the actual production send/retry/backoff mechanism (Req 3.3, amended to permit this documentation-only resolution over retire-or-wire-in). Adds an XCE_TESTING-only ha_send_append_entries_stub_call_count counter, mirroring the ha_wal_ack_send_hook idiom, as the guard against this ever silently regaining a production caller. Task 4.2 will drive the real production path and assert it stays zero. 1063 -> 1064 tests, 0 failures. Zero behavior change to any production send path.
This commit is contained in:
parent
62db70d16d
commit
6d798df35d
4 changed files with 111 additions and 2 deletions
|
|
@ -1422,6 +1422,22 @@ void ha_cb_commit_advanced_for_test(ha_state_t *ha, uint64_t commit_index);
|
|||
* term via the library. TEST-ONLY.
|
||||
*/
|
||||
void ha_arm_own_term_gate_for_test(cluster_t *c);
|
||||
|
||||
/*
|
||||
* ha_send_append_entries_stub_call_count (raft-adapter-conformance task 4.1,
|
||||
* Requirement 3.3): test-only seam counting invocations of
|
||||
* ha_cb_send_append_entries_stub, the on_send_append_entries callback. That
|
||||
* callback is reachable only via the raft library's raft_send_append_entries
|
||||
* (zero production callers) or ha_cb_send_append_entries_for_test above —
|
||||
* see the DORMANT IN PRODUCTION comment on ha_cb_send_append_entries_stub in
|
||||
* ha.c for the full finding. A test that drives only the production
|
||||
* replication path (repl_broadcast / ha_stream_wal_to_standby) must observe
|
||||
* this counter stay at 0; a future change that accidentally gives
|
||||
* raft_send_append_entries a production caller moves it off zero. NULL in
|
||||
* production (the whole symbol does not exist outside XCE_TESTING).
|
||||
* TEST-ONLY.
|
||||
*/
|
||||
extern uint64_t ha_send_append_entries_stub_call_count;
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue