myxce/.wolf
Rongsong Shen bd02064ebc feat(raft-drive-async): offload requester-less config-push to slow lane (task 3.3)
push_config_transport_only spawns one thread per standby then joins them with a
CONF_PUSH_TIMEOUT_MS bounded wait — blocking the caller. On the requester-less
drive-thread paths (promotion + heartbeat convergence) that wait stalls the
io_worker. Route those through ha_config_push_offloadable, gated by
g_drive_async_configpush_offload (default OFF → inline, byte-for-byte legacy;
ON → slow lane, non-blocking).

Flag ON deep-copies the config bytes + sha into a lane ctx (caller keeps owning
and freeing its own buffer); a single cluster-wide single-flight guard
(ha_state_t.configpush_inflight scalar CAS + lane key=1) bounds it to one
config-push fan-out in flight; the in-flight flag is cleared on every terminal
path (two alloc failures, -EEXIST, hard submit error, lane completion). Send
body factored into ha_config_push_do_send.

Three requester-less drive-thread call sites converted: raft_cb_become_leader
(promotion), the HA_REPL_PUSH_CONFIG heartbeat case, and the direct-CTRL_PRIMARY
FSM promotion branch. The admin-upgrade barrier (push_config_to_standbys, has a
waiting requester) and join.c are untouched.

Lands DORMANT like tasks 3.1/3.2: the lane reads c->ha.standby_endpoints and
writes those borrowed standby endpoints, racing io_worker RDHUP teardown if run
off-thread (bug-1197 family). Flag OFF keeps push+teardown serialized on the
io_worker. Task 3.4 flips this ON together with the snapshot and peerctrl flags
after establishing endpoint-lifetime discipline.

Tests (controller suite EXIT=0): test_configpush_offload_runs_on_lane,
test_configpush_inline_when_flag_off, test_configpush_offload_dedups.
Adversarial cpp-review: no CRITICAL/HIGH/MEDIUM findings.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S6fDCtXkkEgupu7rUah1y2
2026-06-26 16:05:54 +00:00
..
hooks add wolf state 2026-06-25 14:30:46 +08:00
anatomy.md add wolf state 2026-06-25 14:30:46 +08:00
buglog.json feat(raft-drive-async): snapshot SlowLane offload + WAL-trim cursor guard (task 3.2) 2026-06-26 15:43:24 +00:00
cerebrum.md add wolf state 2026-06-25 14:30:46 +08:00
config.json chore: checkpoint all prior work for clean state 2026-06-04 13:04:16 +00:00
cron-manifest.json chore: checkpoint all prior work for clean state 2026-06-04 13:04:16 +00:00
cron-state.json feat(libxce-failover): foundation — per-ctx failover state, redirect-hint fields, remove orphaned retry primitive (task 1.1) 2026-06-17 00:05:41 +00:00
daemon.log commit missed 2026-06-16 15:42:43 +08:00
designqc-report.json chore: checkpoint all prior work for clean state 2026-06-04 13:04:16 +00:00
identity.md chore: checkpoint all prior work for clean state 2026-06-04 13:04:16 +00:00
memory.md feat(raft-drive-async): offload requester-less config-push to slow lane (task 3.3) 2026-06-26 16:05:54 +00:00
OPENWOLF.md chore: checkpoint all prior work for clean state 2026-06-04 13:04:16 +00:00
reframe-frameworks.md chore: checkpoint all prior work for clean state 2026-06-04 13:04:16 +00:00
suggestions.json chore: checkpoint all prior work for clean state 2026-06-04 13:04:16 +00:00
token-ledger.json add wolf state 2026-06-25 14:30:46 +08:00