Skip to content

Commit 224453b

Browse files
committed
Add description of the new fields in the IPROTO_RAFT request
Part of #2593
1 parent 866c55d commit 224453b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

doc/dev_guide/internals/box_protocol.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,8 @@ The IPROTO constants that appear within requests or responses that we will descr
141141
IPROTO_RAFT_VOTE=0x01
142142
IPROTO_RAFT_STATE=0x02
143143
IPROTO_RAFT_VCLOCK=0x03
144+
IPROTO_RAFT_LEADER_ID=0x04
145+
IPROTO_RAFT_IS_LEADER_SEEN=0x05
144146
IPROTO_VERSION=0x54
145147
IPROTO_FEATURES=0x55
146148
@@ -1509,8 +1511,11 @@ In other words, there should be a full-mesh connection between the nodes.
15091511
msgpack({
15101512
IPROTO_RAFT_TERM: :samp:`{{MP_UINT unsigned integer}}`, # RAFT term of the instance
15111513
IPROTO_RAFT_VOTE: :samp:`{{MP_UINT unsigned integer}}`, # Instance vote in the current term (if any).
1512-
IPROTO_RAFT_STATE: :samp:`{{MP_UINT unsigned integer}}`, # Instance state; one of the three numbers: 1 -- follower, 2 -- candidate, 3 -- leader.
1513-
IPROTO_RAFT_VCLOCK: :samp:`{{MP_ARRAY {{MP_INT SRV_ID, MP_INT SRV_LSN}, {MP_INT SRV_ID, MP_INT SRV_LSN}, ...}}}` # Current vclock of the instance. Presents only on the instances in the "candidate" state (IPROTO_RAFT_STATE == 2).
1514+
IPROTO_RAFT_STATE: :samp:`{{MP_UINT unsigned integer}}`, # Instance state. Possible values: 1 -- follower, 2 -- candidate, 3 -- leader.
1515+
IPROTO_RAFT_VCLOCK: :samp:`{{MP_ARRAY {{MP_INT SRV_ID, MP_INT SRV_LSN}, {MP_INT SRV_ID, MP_INT SRV_LSN}, ...}}}`, # Current vclock of the instance. Presents only on the instances in the "candidate" state (IPROTO_RAFT_STATE == 2).
1516+
IPROTO_RAFT_LEADER_ID: :samp:`{{MP_UINT unsigned integer}}`, # Current leader node ID as seen by the node that issues the request.
1517+
IPROTO_RAFT_IS_LEADER_SEEN: :samp:`{{MP_BOOL boolean}}` # Shows whether the node has a direct connection to the leader node.
1518+
15141519
})
15151520
15161521
.. _box_protocol-illustration:

0 commit comments

Comments
 (0)