myxce/src/include
Rongsong Shen 6e4fd1aa81 feat: P2-5 repl_start/complete_catchup, repl_needs_snapshot — standby catch-up state
Implement the catch-up state machine as testable pure-logic functions:

- repl_start_catchup(): marks standby in_catch_up=1, stores join_applied_lsn
- repl_complete_catchup(): clears in_catch_up=0, broadcasts ack_cond so any
  blocked repl_wait_ack() re-checks the ACK condition immediately
- repl_needs_snapshot(): pure predicate — returns 1 when standby LSN predates
  oldest surviving WAL segment (snapshot transfer required), 0 otherwise

Also fixes pre-existing linker error: repl.c was missing from controller_src
(xce_controller production binary), causing undefined references to repl_*
symbols introduced in P2-4.

7 new TDD tests in test_repl_catchup.c — all pass. Existing tests green.
2026-05-07 18:14:12 +00:00
..
xce feat: ha_should_redirect + join.c HA redirect/nomaster guard (P1-6) 2026-05-07 15:11:53 +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
client.h feat: P0-2a C-side plumbing for host control 2026-04-17 07:46:41 +00:00
clusterconfig.h support limit 2026-01-12 15:27:54 +08:00
config.h feat: add persistence/HA system constants to config.h with tests (P0-A) 2026-05-07 08:41:19 +00:00
configobj.h save works 2026-03-03 16:49:26 +08:00
dataq.h use nix build & meson & zlog 2025-11-03 18:19:59 +08:00
delay.h feat: rename delaymgr precision→precision_ms, replace sleep() with nanosleep() (P0-2b) 2026-05-07 09:08:03 +00:00
group.h save works 2026-03-03 16:49:26 +08:00
helper.h improve api server support 2026-01-23 17:33:10 +08: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 feat: wire persist_init/recover/start/stop into cluster lifecycle (P0-F) 2026-05-07 13:07:47 +00:00
mylock.h use nix build & meson & zlog 2025-11-03 18:19:59 +08:00
netio.h fix pkt size problem and fmt_jobid 2025-12-24 17:56:45 +08: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: P2-4 wire repl_broadcast into persist_wal_async/sync_append; last_replicated_crc 2026-05-07 17:54:48 +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: P2-5 repl_start/complete_catchup, repl_needs_snapshot — standby catch-up state 2026-05-07 18:14:12 +00:00
request.h feat: P0-2a C-side plumbing for host control 2026-04-17 07:46:41 +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: add PersistConfig, SnapshotHeader, ReplEnvelope Cap'n Proto schemas (P0-9) 2026-05-07 10:19:33 +00:00
utils.h save works 2026-03-03 16:49:26 +08:00
vtaskmgr.h security communication with openssl and simplify netio 2025-11-18 11:26:36 +08:00
wal_types.h feat: P2-4 wire repl_broadcast into persist_wal_async/sync_append; last_replicated_crc 2026-05-07 17:54:48 +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: P0-2a C-side plumbing for host control 2026-04-17 07:46:41 +00:00
xcectx.h support passing args to request handle for elimination of global var 2025-12-11 17:07:51 +08: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