feat: add config_repl Phase 1 — HEAD-file storage, SHA-256, trim, stale check, sanitise_cn

- config_repl.h/.c: atomic versioned file save, pointer file, trim, stale check
- test_config_repl.c: 17 Unity tests covering all Phase 1 storage functions
- typemap.h: add repl/heartbeat types + union members for xce_request_t/xce_reply_t
- clusterconfig.h: add config_generation field to cluster_config_t (capnp schema ref)
- meson.build: add config_repl.c and test_config_repl.c to build targets
- controller_test.c: register test_config_repl dispatch function
This commit is contained in:
Rongsong Shen 2026-05-13 15:45:28 +00:00
parent 1c4a103a66
commit 491c2550c2
7 changed files with 926 additions and 7 deletions

View file

@ -1,5 +1,6 @@
controller_src = [
'cluster.c',
'config_repl.c',
'dataex.c',
'ha.c',
'job.c',
@ -97,12 +98,16 @@ controller_unit_test_src = [
'testsuite/test_p3_hardening.c',
'testsuite/test_p3_manual_failover.c',
'testsuite/test_ctrl_metrics.c',
'testsuite/test_config_repl.c',
'persist.c',
'ha.c',
'repl.c',
'ctrl_metrics.c',
'config_repl.c',
]
ssl_dep = dependency('openssl')
controller_unit_test_deps = [
libxce_dep,
unity_dep,
@ -110,6 +115,7 @@ controller_unit_test_deps = [
thread_dep,
zlib_dep,
c_capnproto_dep,
ssl_dep,
]
controller_unit_test = executable('controller_unit_test',