You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/dev_guide/internals/box_protocol.rst
+10-21Lines changed: 10 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -1418,16 +1418,10 @@ IPROTO_FLAG_WAIT_ACK (0x04) will be set if this is the last message for a synchr
1418
1418
IPROTO_RAFT = 0x1e
1419
1419
~~~~~~~~~~~~~~~~~~
1420
1420
1421
-
[TBD] intro
1422
-
1423
-
IPROTO_RAFT рассылается броадкастами всем подключённым к ноде репликам.
1424
-
Если подразумевается какой-то ответ на запрос (например, когда это запрос другим нодам на голосование),
1425
-
то нужно, чтобы нода сама была подключена репликой к серверу, от которого ждёт ответ, потому что он придёт по каналу репликации.
1426
-
1427
-
Другими словами, связь между всеми должна быть в обе стороны (фуллмеш)
1428
-
1429
-
1430
-
[TBD] update request structure
1421
+
The IPROTO_RAFT request is broadcasted to all the replicas connected to the node.
1422
+
If there should be a response, for example, in case of a vote request to other nodes, the response will be also an IPROTO_RAFT message.
1423
+
In this case, the node should be connected as a replica to another node from which the response is expected because the response is sent via the replication channel.
1424
+
In other words, there should be a full-mesh connection between the nodes.
1431
1425
1432
1426
.. cssclass:: highlight
1433
1427
.. parsed-literal::
@@ -1437,22 +1431,17 @@ IPROTO_RAFT рассылается броадкастами всем подкл
IPROTO_REPLICA_ID: :samp:`{{MP_INT integer}}`, # ID of the replica which the request came from
1435
+
1443
1436
})
1444
1437
# <body>
1445
1438
msgpack({
1446
-
IPROTO_RAFT_TERM=0x00
1447
-
IPROTO_RAFT_VOTE=0x01
1448
-
IPROTO_RAFT_STATE=0x02
1449
-
IPROTO_RAFT_VCLOCK=0x03
1439
+
IPROTO_RAFT_TERM: :samp:`{{MP_UINT unsigned integer}}`, # RAFT term of the instance
1440
+
IPROTO_RAFT_VOTE: :samp:`{{MP_UINT unsigned integer}}`, # Instance vote in the current term (if any).
1441
+
IPROTO_RAFT_STATE: :samp:`{{MP_UINT unsigned integer}}`, # Instance state; one of the three numbers: 1---follower, 2---candidate, 3---leader.
1442
+
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).
1450
1443
})
1451
1444
1452
-
[TBD] update about response
1453
-
1454
-
Это асинхронный протокол, и response там - другое сообщение IPROTO_RAFT, а бывает вообще без response
0 commit comments