fix(election-iomgr-refactor): config replication and RDHUP failover chain

- cluster.c: fix upgradeConfig handler (standbys apply, not primaries)
- cluster.c: fix raw_pkt_copy opcode peek (read scalar before capn_free)
- config_repl.h: enable CONF_ENABLE_UPGRADE_CONFIG=1
- config_repl.c: use client_ssl_ctx for outgoing config fetch connections
- config_repl.c: after config fetch, run cluster_init_phase2 + find_primary
- join.c: push config to newly-joined standbys on OPCode_join
- myapp.c: schedule fetch_config_from_primary after skipping own election
- ha.c: arm heartbeat timeout watchdog after find_and_connect_to_primary
This commit is contained in:
Rongsong Shen 2026-05-31 02:08:48 +00:00
parent 2f5a738b36
commit fd93997f78
6 changed files with 70 additions and 10 deletions

View file

@ -16,9 +16,9 @@
/* Sentinel name for the synthetic lost-and-found queue and host */
#define XCE_LOST_AND_FOUND_NAME "lost_and_found"
/* Compile-time gate for OP_upgradeConfig (Phase 2, default disabled) */
/* Compile-time gate for OP_upgradeConfig (enabled: standbys apply pushed config) */
#ifndef CONF_ENABLE_UPGRADE_CONFIG
#define CONF_ENABLE_UPGRADE_CONFIG 0
#define CONF_ENABLE_UPGRADE_CONFIG 1
#endif
/* Push timeout for standby fan-out (ms) */