forked from lei.chen/myxce
feat: split cluster_init() into phase1/phase2; update myapp_run() for two-phase startup with am_i_primary gating
- cluster_init_phase1(): hooks, HA init (priority from --peers), standby_endpoints zarray, cbuf - cluster_init_phase2(): SSL ctx from ha.ssl_ctx, cluster_config guard, kvmgr sizing, iomgr, endpoint, persist, role promotion, create_lost_and_found, persist_recover - cluster_init(): legacy wrapper calling both phases with inline SSL init for backward compat - myapp_run(): phase1 → SSL init → am_i_primary → load_primary_config/fetch_config_from_primary → phase2 → start → run - myreq_handler(): add OPCode_replConfig and OPCode_upgradeConfig dispatch - handle_endpoint_error(): prune standby_endpoints on HostRole_controller disconnect - cluster_run(): log restart_requested on exit - config_repl.c: add create_lost_and_found, handle_config_request, handle_upgrade_config stubs - config_repl.h: add declarations for new stubs; include netio.h + request.h - cluster.h: declare cluster_init_phase1 and cluster_init_phase2 - myconf.c: fix FATAL → ERROR (FATAL macro undefined); add fetch_config_from_primary stub
This commit is contained in:
parent
ec3cab40c3
commit
6b06aa02d9
6 changed files with 307 additions and 92 deletions
|
|
@ -22,6 +22,8 @@
|
|||
typedef int (*collect_check_fn_t)(void*);
|
||||
|
||||
extern int check_controller(void*);
|
||||
extern int cluster_init_phase1(cluster_t*);
|
||||
extern int cluster_init_phase2(cluster_t*);
|
||||
extern int cluster_init(cluster_t*);
|
||||
extern int cluster_start(cluster_t*);
|
||||
extern int cluster_run(cluster_t*);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue