myxce/src
Rongsong Shen a289edb777 feat: ha_state_t, ha_config_t, ha_init/fini, role enum + config validation (P1-2)
- Full ha.h: ctrl_role_t enum (CTRL_PRIMARY/CTRL_STANDBY), ha_config_t,
  ha_state_t with _Atomic fields (term, role, applied_lsn, promotion
  counters, watchdog_stop), pthread_mutex_t lock, and public API.
- endpoint_t* omitted from ha_state_t — including netio.h would pull
  OpenSSL headers and risk circular deps; watchdog (P1-3) includes
  netio.h directly where needed.
- ha_init validates: heartbeat_interval_ms >= 2000, heartbeat_timeout_ms
  >= heartbeat_interval_ms, election_timeout_ms >= 500; returns -EINVAL
  on bad config; zeros struct and sets initial role to CTRL_STANDBY.
- ha_fini destroys mutex; watchdog thread join deferred to P1-3.
- am_i_primary / ha_promote_to_primary / ha_demote_to_standby are
  no-op stubs; cluster_t->ha field not yet wired (P1-5), so these avoid
  incomplete-type dereferences until then.
- TDD: 5 new tests in test_ha_role.c confirmed RED before implementation,
  all 5 GREEN after; all prior controller tests remain green.
2026-05-07 14:08:15 +00:00
..
autoscaler support shared libxce(for api server) 2026-01-19 11:02:49 +08:00
controller feat: ha_state_t, ha_config_t, ha_init/fini, role enum + config validation (P1-2) 2026-05-07 14:08:15 +00:00
docs Merge branch 'merge_api_server' into persistent_ha 2026-05-07 04:41:14 +00:00
frontend improve frontend jobid display 2026-05-07 02:36:24 +00:00
include feat: xce_disable_hook() + _Atomic hook_fn_t + NULL-slot reuse (P1-2a) 2026-05-07 13:55:42 +00:00
lib feat: xce_disable_hook() + _Atomic hook_fn_t + NULL-slot reuse (P1-2a) 2026-05-07 13:55:42 +00:00
nixSupport Merge Go frontend (apiserver + xcecli) into meson build 2026-04-14 11:23:18 +08:00
scheduler fix select eval ctx share 2026-05-07 04:37:18 +00:00
schema feat: add PersistConfig, SnapshotHeader, ReplEnvelope Cap'n Proto schemas (P0-9) 2026-05-07 10:19:33 +00:00
tools save works 2026-03-04 18:18:53 +08:00
worker Merge Go frontend (apiserver + xcecli) into meson build 2026-04-14 11:23:18 +08:00
flake.lock docs: mark Phase 6 complete in phase6-scheduler-integration-plan 2026-04-30 07:17:32 +00:00
flake.nix save works 2026-03-04 18:18:53 +08:00
meson.build Merge Go frontend (apiserver + xcecli) into meson build 2026-04-14 11:23:18 +08:00
meson.options Merge Go frontend (apiserver + xcecli) into meson build 2026-04-14 11:23:18 +08:00