Extract cluster_init_managers() which initializes configmgr, jobmgr, resmgr, workermgr, qmgr, sharedinst, xstrings, endpoints, and job_obj. Call it from cluster_init_phase1 (after init_controller_tunables) so all managers exist before election. This fixes the heap-buffer-overflow in handle_connection: incoming OP_requestVote SSL connections arrive during the pre-election phase and call zarray_store(&c->endpoints) — which requires endpoints to be initialized first. cluster_init_phase2 is simplified: it no longer re-initializes these managers and only sets up iomgr/SSL, opens the listener, and loads cluster-config-dependent data. |
||
|---|---|---|
| .. | ||
| autoscaler | ||
| controller | ||
| docs | ||
| frontend | ||
| include | ||
| lib | ||
| nixSupport | ||
| scheduler | ||
| schema | ||
| tools | ||
| worker | ||
| flake.lock | ||
| flake.nix | ||
| meson.build | ||
| meson.options | ||