feat(controller): OPCode_probeConfigTag handler with Request envelope reply (bug-1506)

- Add OPCode_probeConfigTag dispatch in cluster.c
- Implement probe_config_tag handler returning config tag via
  standard xce_reply() → RequestReply envelope
- Populate redirectHost/redirectPort for follow_redirects support
- Wire probeConfigTag reply through typemap
- Add probeConfigTagReply struct to controller.capnp schema
This commit is contained in:
Rongsong Shen 2026-08-10 10:00:08 +00:00
parent b00e97ffe6
commit 90d7dd8241
Signed by: rshen
SSH key fingerprint: SHA256:8Vf2pZ3h6rJa7EhGK+WaAQ9Mta/apZvteW6g9U/WKKk
5 changed files with 64 additions and 8 deletions

View file

@ -816,6 +816,15 @@ static int myreq_handler(vtask_t* task)
}
break;
#endif
case OPCode_probeConfigTag:
/* bug-1506: return the current config generation tag for xceadmin's
* config push --dry-run. Read-only — no WAL commit, no SHA
* verification. Any role (PRIMARY or STANDBY) can service this;
* ha_dispatch_gate already allows OPCode_probeConfigTag on every
* non-INIT role. Redirect hints are filled inside the handler. */
rc = handle_probe_config_tag(c, ep, &request);
break;
case OPCode_schedAdmin: {
/* Stateless pass-through forward to the scheduler (task 10.1, Req
* 5.10). The controller commits no WAL entry and interprets no