feat(ha-config-bootstrap): implement bootstrap_config_if_needed() (task 5.3)
- Probe all peers: any tag>0 -> defer_config_fetch=true; all-zero -> proceed; none reachable -> exponential backoff 500ms->10s cap with WARN per attempt - Wire into myapp.c: before ha_wait_for_heartbeat_or_timeout() - Post-election: defer_config_fetch && CTRL_STANDBY -> fetch_config_from_primary() - INFO log for all three bootstrap outcomes (Req 10.2) - XCE_TESTING hook for probe mock; test_ha_bootstrap_support.c installs mock - 9/9 bootstrap tests GREEN, 141/141 full suite GREEN
This commit is contained in:
parent
0c4a0760d1
commit
ab174c8b06
6 changed files with 163 additions and 8 deletions
|
|
@ -124,7 +124,7 @@ Dependency order: startup validation (D) unblocks vtaskmgr before election (A);
|
|||
- _Requirements: 3.1, 1.3_
|
||||
- _Boundary: Config Bootstrap (config_repl.c)_
|
||||
|
||||
- [ ] 5.3 Implement bootstrap_config_if_needed() and wire into startup
|
||||
- [x] 5.3 Implement bootstrap_config_if_needed() and wire into startup
|
||||
- Returns immediately if `config_tag != 0`
|
||||
- Probes all peers; three outcomes: all-zero → proceed; any non-zero → set `defer_config_fetch`, return; no peer reachable → retry with backoff 500ms→10ms→...→10s cap; log WARN each failed attempt
|
||||
- Integrate into `myapp.c`: call after `cluster_open_listener()` + `iomgr_init()` + `vtaskmgr_init()`, before `ha_wait_for_heartbeat_or_timeout()`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue