myxce/src/frontend/apiserver/backend
Rongsong Shen 8b1e13a52b
feat(component-failover-adoption): route apiserver's candidate parsing through the real C parser
Replaces apiserver's hand-written Go parsePeer() with a CGO wrapper
around the shared C parser+validator pair (xce_parse_peers then
xce_cluster_config_validate, both src/lib/cluster.c) that worker and
scheduler already use from their own main.c's. Gives apiserver the same
[name=]host:port[,...] syntax (including the name= prefix the old Go
parser could not express) and identical malformed-candidate rejection
(empty host, port <= 0, non-numeric port) -- round-1 review caught the
first pass skipping the validate() half, silently accepting inputs
worker/scheduler both reject.

A malformed entry now rejects the whole candidate list rather than
being skipped with a warning (matches xce_parse_peers()'s own
all-or-nothing construction and worker/scheduler's precedent) --
surfaced loudly via RegisterToBackend's error, not silently.

Parsing only -- RegisterToBackend()'s connect loop and tryConnect()
are unchanged; collapsing them into a single connect call is task
4.2's job.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NNB4zGPCsHyDUCDJyMbiQN
2026-08-12 04:34:05 +00:00
..
auth Merge Go frontend (apiserver + xcecli) into meson build 2026-04-14 11:23:18 +08:00
candidates.go feat(component-failover-adoption): route apiserver's candidate parsing through the real C parser 2026-08-12 04:34:05 +00:00
candidates_test.go feat(component-failover-adoption): route apiserver's candidate parsing through the real C parser 2026-08-12 04:34:05 +00:00
clib.go feat(component-failover-adoption): route apiserver's candidate parsing through the real C parser 2026-08-12 04:34:05 +00:00
config.go feat(component-failover-adoption): route apiserver's candidate parsing through the real C parser 2026-08-12 04:34:05 +00:00
control_host_test.go fix: address P0-2b review issues - build tag and actionType guard 2026-04-17 08:25:05 +00:00
convert.go feat(job-array-single-wal-record): API-server-side (Go) local expansion of the compact push 2026-07-15 15:56:48 +00:00
convert_pure.go merge 2026-07-23 12:35:10 +08:00
convert_test.go feat(job-array-single-wal-record): API-server-side (Go) local expansion of the compact push 2026-07-15 15:56:48 +00:00
handler.go fix(schema): rename struct Data -> XceData to unshadow capnp builtin blob type 2026-07-22 09:22:04 +00:00
handler_test.go fix(schema): rename struct Data -> XceData to unshadow capnp builtin blob type 2026-07-22 09:22:04 +00:00
heartbeat.go fix: P1-3 address heartbeat timer leak, test drain, and store consistency 2026-04-17 14:20:02 +00:00
heartbeat_test.go fix: P1-3 address heartbeat timer leak, test drain, and store consistency 2026-04-17 14:20:02 +00:00
integration_test.go fix front end issues 2026-05-01 21:22:45 +08:00
notification.go fix front end issues 2026-05-01 21:22:45 +08:00
stub.go Init commit of jobs output/error message peek project. 2026-05-09 16:57:54 +08:00
stub_funcs_test.go feat: add HA candidate failover to API server backend 2026-05-08 03:31:35 +00:00
val_helpers.h test(apiserver): add integration tests for P0+P1 backend features 2026-04-18 11:56:31 +00:00
wire_dispatch_support.go fix(schema): rename struct Data -> XceData to unshadow capnp builtin blob type 2026-07-22 09:22:04 +00:00
wire_dispatch_test.go test(job-array-single-wal-record): end-to-end integration test for the compact push 2026-07-15 17:27:34 +00:00