myxce/src/include
Rongsong Shen 9b4b805a27 feat(raft-apply-decoupling): resolve pending continuations on demotion/truncation (task 1.4)
commit_resolve_pending_above(ce, lsn_floor, rc) fails every registered
continuation for lsn > lsn_floor, reusing commit_resolve()'s existing
exactly-once/idempotent guarantee (no parallel bookkeeping path).

Truncation: a new on_truncate/truncate_cb_ctx callback on persist_t
(same inversion-of-control shape as the existing on_durable_advance
hook) fires from persist_truncate_wal_above after releasing p->lock,
only when entries were actually removed. This one wrapper covers all
three real truncation call sites: raft_cb_become_leader's
post-election truncate, the library's on_truncate_from
conflict-reconcile, and ha_demotion_convergence_fn's post-demotion
truncate.

Demotion: raft_cb_become_follower calls
commit_resolve_pending_above(&c->commit, 0, -XCE_ERR_STANDBY) --
lsn_floor=0 fails everything, since a demoted node can never
authoritatively confirm anything still pending (CP posture).

Without this, a demoted or truncated node would leave any pending
async command permanently unresolved -- the requester would simply
never get a reply, worse than today's bounded-timeout behavior.

Also closes bug-1407 (pre-existing test_config_repl flake, unrelated
to this feature) -- confirmed fixed as a side effect of prior tasks
in this series, 70/70 passing across 3 independent runs.
2026-07-03 11:58:10 +00:00
..
xce feat(raft-drive-async): SlowLane bounded executor for long blocking I/O (task 1.2) 2026-06-26 05:24:00 +00:00
attrs.h improve xkvmgr and testsuite for scheduler 2026-02-26 14:39:12 +08:00
bitset.h - introduce bitset 2026-02-13 11:01:33 +08:00
byteorder.h fix: ha_seed_jitter loop-until-full partial read; byteorder.h musl portability 2026-05-13 14:18:43 +00:00
client.h fix: close bug-1401 ctrlstatus leak, bug-1400 jobsub leak; harden bug-1396 harness 2026-07-03 02:40:52 +00:00
clusterconfig.h fix(ha-bootstrap): restore vcpus@7 field as deprecated UInt32 for config blob backward compatibility 2026-05-29 13:55:23 +00:00
config.h fix(raft-ha-core-safety): close 5.10a — WAL segment rotation + endpoint UAF blocking real snapshot catch-up 2026-07-02 04:11:20 +00:00
configobj.h save works 2026-03-03 16:49:26 +08:00
ctrl_metrics.h feat: P3-7 ctrl_metrics — 7 atomic counters/gauges + descriptor table + persist wiring 2026-05-08 00:04:06 +00:00
dataq.h use nix build & meson & zlog 2025-11-03 18:19:59 +08:00
delay.h fix(lib): normalize delaymgr to one CLOCK_MONOTONIC ms timescale, fixing seconds-task starvation 2026-07-02 03:40:08 +00:00
group.h save works 2026-03-03 16:49:26 +08:00
helper.h feat: fill scheduler controller message gaps 2026-05-12 07:01:52 +00:00
hook.h feat: xce_disable_hook() + _Atomic hook_fn_t + NULL-slot reuse (P1-2a) 2026-05-07 13:55:42 +00:00
htab.h reformat code and job array 2025-11-07 16:14:27 +08:00
idgen.h jobid generate 2025-11-07 18:17:34 +08:00
jobj.h save works 2026-03-02 12:14:30 +08:00
kv.h feat: implement kvmgr_capture_keys for lock-free checkpoint serialization (P0-14a) 2026-05-07 11:07:41 +00:00
kvmgr.h feat: implement kvmgr_capture_keys for lock-free checkpoint serialization (P0-14a) 2026-05-07 11:07:41 +00:00
misc.h 1st workable scheduler with resource from controller 2025-12-31 15:50:52 +08:00
myconf.h fix(raft-ha-core-safety): close 5.10a — WAL segment rotation + endpoint UAF blocking real snapshot catch-up 2026-07-02 04:11:20 +00:00
mylock.h feat(libxce-failover): reconnect recovery — ctx ERR->RUN reset + stale wbuf drain (fixes post-failover EINVAL) (task 3.2) 2026-06-17 03:36:24 +00:00
netio.h fix(raft-ha-core-safety): close 5.10a — WAL segment rotation + endpoint UAF blocking real snapshot catch-up 2026-07-02 04:11:20 +00:00
objs.h update controller code 2025-11-05 16:58:57 +08:00
ordq.h pass pend reason back to controller 2025-12-23 15:29:26 +08:00
persist.h feat(raft-apply-decoupling): resolve pending continuations on demotion/truncation (task 1.4) 2026-07-03 11:58:10 +00:00
preason.h scheduling using real slots number 2025-12-30 18:13:15 +08:00
qobj.h save works 2026-03-02 12:14:30 +08:00
repl.h feat(ha-term-safety): retire term-0 repl_broadcast live send; carry leader term on replication (task 3.4) 2026-06-22 15:45:14 +00:00
request.h feat(ha-heartbeat-committed-propagation): add xce_ha_heartbeat_req sender (task 1.2) 2026-06-20 11:40:31 +00:00
resobj.h save works 2026-03-03 16:49:26 +08:00
resreq.h fix select eval ctx share 2026-05-07 04:37:18 +00:00
typemap.h feat(raft-ha-core-safety): establish snapshot (term,lsn) boundary on install (task 3.2) 2026-07-01 13:08:10 +00:00
utils.h fix(persist): zero nresvals_to_sched after free_name_val_list 2026-05-20 09:39:07 +00:00
vtaskmgr.h feat(raft-drive-async): peer-control vtask dispatch shim, dormant (task 3.1) 2026-06-26 11:12:04 +00:00
wal_types.h feat(ha-term-safety): add WAL_CONFIG_MARKER entry type + reference payload codec (task 4.1) 2026-06-22 09:37:23 +00:00
wobj.h save works 2026-03-02 12:14:30 +08:00
xcealloc.h scheduling using real slots number 2025-12-30 18:13:15 +08:00
xceapi.h feat(controller-status): libxce xcecli_ctrlstatus any-node read + decode + free (task 3.1) 2026-06-20 05:18:04 +00:00
xcectx.h fix(libxce): bug-1077 ctrlstatus crash from shared reply-union type confusion 2026-06-24 09:44:43 +00:00
xcelimit.h save works 2026-03-03 16:49:26 +08:00
xcelog.h use clang-format to format code 2025-11-25 14:58:09 +08:00
xlist.h support limit 2026-01-12 15:27:54 +08:00
xstring.h save works 2026-03-03 16:49:26 +08:00
xvec.h using xvec related api in scheduler 2026-01-16 18:21:37 +08:00
zarray.h use librtti for worker/queue/resource 2026-02-25 16:56:50 +08:00