Skip to content

Commit d0ece72

Browse files
committed
Fixes gh-2185 IPROTO_BALLOT rework and a new field
1 parent f459750 commit d0ece72

File tree

1 file changed

+28
-7
lines changed

1 file changed

+28
-7
lines changed

doc/dev_guide/internals/box_protocol.rst

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -168,11 +168,12 @@ The IPROTO constants that appear within requests or responses that we will descr
168168
IPROTO_EXPR=0x27
169169
IPROTO_OPS=0x28
170170
IPROTO_BALLOT=0x29
171-
IPROTO_BALLOT_IS_RO=0x01
171+
IPROTO_BALLOT_IS_RO_CFG=0x01
172172
IPROTO_BALLOT_VCLOCK=0x02
173173
IPROTO_BALLOT_GC_VCLOCK=0x03
174-
IPROTO_BALLOT_IS_LOADING=0x04
174+
IPROTO_BALLOT_IS_RO=0x04
175175
IPROTO_BALLOT_IS_ANON=0x05
176+
IPROTO_BALLOT_IS_BOOTED=0x06
176177
IPROTO_TUPLE_META=0x2a
177178
IPROTO_OPTIONS=0x2b
178179
IPROTO_DATA=0x30
@@ -1273,16 +1274,36 @@ The fields within IPROTO_BALLOT are map items:
12731274

12741275
.. code-block:: none
12751276
1276-
IPROTO_BALLOT_IS_RO (0x01) + MP_BOOL
1277+
IPROTO_BALLOT_IS_RO_CFG (0x01) + MP_BOOL
12771278
IPROTO_BALLOT_VCLOCK (0x02) + vclock
12781279
IPROTO_BALLOT_GC_VCLOCK (0x03) + vclock
1279-
IPROTO_BALLOT_IS_LOADING (0x04) + MP_BOOL
1280+
IPROTO_BALLOT_IS_RO (0x04) + MP_BOOL
12801281
IPROTO_BALLOT_IS_ANON = 0x05 + MP_BOOL
1282+
IPROTO_BALLOT_IS_BOOTED = 0x06 + MP_BOOL
12811283
1282-
IPROTO_BALLOt-IS_ANON corresponds to :ref:`box.cfg.replication_anon <cfg_replication-replication_anon>`.
1284+
IPROTO_BALLOT_IS_RO_CFG and IPRO_BALLOT_VCLOCK and IPROTO_BALLOT_GC_VCLOCK and IPROTO_BALLOT_IS_RO
1285+
were added in version :doc:`2.6.1 </release/2.6.1>`.
1286+
IPROTO_BALLOT_IS_ANON was added in version :doc:`2.7.1 </release/2.7.1>`.
1287+
IPROTO_BALLOT_IS_BOOTED was added in version 2.7.2.
1288+
There have been some name changes starting with version 2.7.2:
1289+
IPROTO_BALLOT_IS_RO_CFG was formerly called IPROTO_BALLOT_IS_RO,
1290+
and IPROTO_BALLOT_IS_RO was formerly called IPROTO_BALLOT_IS_LOADING.
12831291

1284-
The items other than IPROTO_BALLOT_IS_ANON were added in version :doc:`2.6.1 </release/2.6.1>`.
1285-
PROTO_BALLOT_IS_ANON was added in version :doc:`2.7.1 </release/2.7.1>`.
1292+
IPROTO_BALLOT_IS_RO_CFG corresponds to :ref:`box.cfg.read_only <cfg_basic-read_only>`.
1293+
1294+
IPROTO_BALLOT_GC_VCLOCK may have the value of the instance's oldest
1295+
WAL entry, which corresponds to :ref:`box.info.gc().vclock <box_info_gc>`.
1296+
1297+
IPROTO_BALLOT_RO is true if the instance is not writable,
1298+
which may happen for a variety of reasons, such as:
1299+
it was configured as :ref:`read_only <cfg_basic-read_only>`,
1300+
or it has :ref:`orphan status <replication-orphan_status>`,
1301+
or it is a :ref:`Raft <repl_leader_elect>` follower.
1302+
1303+
IPROTO_BALLOT_IS_ANON corresponds to :ref:`box.cfg.replication_anon <cfg_replication-replication_anon>`.
1304+
1305+
IPROTO_BALLOT_IS_BOOTED is true if the instance has finished its
1306+
bootstrap or recovery process.
12861307

12871308
.. _box_protocol-flags:
12881309

0 commit comments

Comments
 (0)