feat(raft-adapter-conformance): add term field to ReplConfigPushReply schema
Additive term @2 field on ReplConfigPushReply so a configuration-push reply can carry the replying member's current term for term-discovery (Requirement 7.4). Companion repl_config_push_reply_t struct field added in typemap.h per the existing $C.mapname convention.
This commit is contained in:
parent
34ab78d72d
commit
a88c5fbf21
2 changed files with 9 additions and 0 deletions
|
|
@ -491,6 +491,8 @@ struct repl_config_push_req_s {
|
|||
struct repl_config_push_reply_s {
|
||||
int accepted; /* 1 if standby accepted the push */
|
||||
uint64_t version_tag; /* standby's current version tag after decision */
|
||||
uint64_t term; /* replying member's current term (raft-adapter-
|
||||
* conformance Req 7.4 term-discovery channel) */
|
||||
};
|
||||
|
||||
struct upgrade_config_req_s {
|
||||
|
|
|
|||
|
|
@ -805,6 +805,13 @@ struct ReplConfigPushRequest $C.mapname("repl_config_push_req_t") {
|
|||
struct ReplConfigPushReply $C.mapname("repl_config_push_reply_t") {
|
||||
accepted @0: Bool $C.mapname("accepted");
|
||||
versionTag @1: UInt64 $C.mapname("version_tag");
|
||||
# raft-adapter-conformance Requirement 7.4: the replying member's current
|
||||
# term, so a higher term can be discovered through this reply channel the
|
||||
# same way it already is through heartbeat and WAL-NACK replies. Additive
|
||||
# field (ordinal 2) — an old-code standby's reply decodes as term=0 on a
|
||||
# new-code primary, which can never look like a higher term (terms start
|
||||
# at 1), so no spurious adoption occurs under mixed-version rollout.
|
||||
term @2: UInt64 $C.mapname("term");
|
||||
}
|
||||
|
||||
struct UpgradeConfigRequest $C.mapname("upgrade_config_req_t") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue