forked from lei.chen/myxce
The vote_request_thread was sending raw capnp(RequestVoteRequest) bytes but the server-side iomgr decodes every incoming packet as a Request struct. This caused the term field (uint64) to be misread as the opcode field (uint16), so vote RPCs were silently misrouted (term=1 → OPCode_reply, term=2 → OPCode_hello) and no node ever got a vote from its peers. Fix: - controller.capnp: add requestvotemsg @27 to Request.body and requestvotereplymsg @14 to RequestReply.data - typemap.h: move request_vote_req_t/reply_t before xce_request_t; add requestvotemsg/requestvotereplymsg to body/data unions - ha.c: rewrite vote_request_thread send/recv to use xce_encode() wrapper and decode outer Request→inner RequestReply on receive - cluster.c: add case OPCode_requestVote handler calling handle_request_vote() and replying via xce_reply() All 188 unit tests pass. |
||
|---|---|---|
| .. | ||
| autoscaler | ||
| controller | ||
| docs | ||
| frontend | ||
| include | ||
| lib | ||
| nixSupport | ||
| scheduler | ||
| schema | ||
| tools | ||
| worker | ||
| flake.lock | ||
| flake.nix | ||
| meson.build | ||
| meson.options | ||