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

@ -197,6 +197,14 @@ typedef struct {
uint64_t peer_last_log_lsn;
} request_vote_reply_t;
typedef struct {
char *name;
} probe_config_tag_req_t;
typedef struct {
uint64_t config_tag;
} probe_config_tag_reply_t;
/* Heartbeat reply state report — carries standby's applied_lsn and config_tag,
* plus its raft term so the primary can discover a higher term it lost track
* of (bug-1421 term-discovery: an AE reject response never reaches the raft
@ -291,6 +299,7 @@ typedef struct {
xce_ctrlstatus_t* ctrlstatus;
xce_fetchfile_reply_t* fetchfilereply;
sched_admin_reply_t* schedadminreplymsg;
probe_config_tag_reply_t* probeconfigtagreplymsg;
} data;
/* Req 7: standby redirect fields — populated when status == XCE_ERR_STANDBY */
char *redirect_host;
@ -331,6 +340,7 @@ typedef struct {
snapshot_transfer_t* snapshottransfermsg;
xce_fetchfile_t* fetchfilemsg;
sched_admin_req_t* schedadminmsg;
probe_config_tag_req_t* probeconfigtagrequestmsg;
} body;
} xce_request_t;
@ -341,14 +351,6 @@ typedef struct {
* request_vote_req_t and request_vote_reply_t are defined above
* xce_reply_t so they can be used in the xce_request_t body union. */
typedef struct {
char *name;
} probe_config_tag_req_t;
typedef struct {
uint64_t config_tag;
} probe_config_tag_reply_t;
typedef struct {
uint64_t term;
uint64_t lsn;