fix(ha-config-bootstrap): start iomgr and vtaskmgr before election so vote RPCs are accepted

This commit is contained in:
Rongsong Shen 2026-05-29 12:11:12 +00:00
parent 96df7285da
commit 4e9924e95c
2 changed files with 14 additions and 2 deletions

View file

@ -68,6 +68,13 @@ int myapp_run(myconf_t* myconf)
vtaskmgr_init(&(c.vtaskmgr), nvcpus);
}
/* Req 1.2: start the I/O worker thread so that incoming OP_requestVote RPCs
* from peers are accepted and dispatched during the election phase.
* Without iomgr_start here, connections queue in the kernel (Recv-Q > 0)
* but no thread reads them, causing peers to time out waiting for vote replies. */
iomgr_start(&(c.iomgr));
vtaskmgr_start(&(c.vtaskmgr));
/* Req 3.1–3.4: probe peers for config tags before election so that a node
* joining an existing cluster knows to defer its config fetch to post-election
* rather than participating as a first-boot candidate with no config. */