Skip to content

Commit 4f5559c

Browse files
Merge pull request #2241 from tarantool/pgulutzan-gh-2185
Fixes gh-2185 IPROTO_BALLOT rework and a new field
2 parents 963cf6b + b2113a1 commit 4f5559c

File tree

2 files changed

+96
-28
lines changed

2 files changed

+96
-28
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.3 and 2.8.2 and 2.9.1.
1288+
There have been some name changes starting with version 2.7.3 and 2.8.2 and 2.9.1:
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 can be the vclock value of the instance's oldest
1295+
WAL entry, which corresponds to :ref:`box.info.gc().vclock <box_info_gc>`.
1296+
1297+
IPROTO_BALLOT_IS_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

locale/ru/LC_MESSAGES/dev_guide/internals/box_protocol.po

Lines changed: 68 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -289,11 +289,12 @@ msgid ""
289289
"IPROTO_EXPR=0x27\n"
290290
"IPROTO_OPS=0x28\n"
291291
"IPROTO_BALLOT=0x29\n"
292-
"IPROTO_BALLOT_IS_RO=0x01\n"
292+
"IPROTO_BALLOT_IS_RO_CFG=0x01\n"
293293
"IPROTO_BALLOT_VCLOCK=0x02\n"
294294
"IPROTO_BALLOT_GC_VCLOCK=0x03\n"
295-
"IPROTO_BALLOT_IS_LOADING=0x04\n"
295+
"IPROTO_BALLOT_IS_RO=0x04\n"
296296
"IPROTO_BALLOT_IS_ANON=0x05\n"
297+
"IPROTO_BALLOT_IS_BOOTED=0x06\n"
297298
"IPROTO_TUPLE_META=0x2a\n"
298299
"IPROTO_OPTIONS=0x2b\n"
299300
"IPROTO_DATA=0x30\n"
@@ -337,11 +338,12 @@ msgstr ""
337338
"IPROTO_EXPR=0x27\n"
338339
"IPROTO_OPS=0x28\n"
339340
"IPROTO_BALLOT=0x29\n"
340-
"IPROTO_BALLOT_IS_RO=0x01\n"
341+
"IPROTO_BALLOT_IS_RO_CFG=0x01\n"
341342
"IPROTO_BALLOT_VCLOCK=0x02\n"
342343
"IPROTO_BALLOT_GC_VCLOCK=0x03\n"
343-
"IPROTO_BALLOT_IS_LOADING=0x04\n"
344+
"IPROTO_BALLOT_IS_RO=0x04\n"
344345
"IPROTO_BALLOT_IS_ANON=0x05\n"
346+
"IPROTO_BALLOT_IS_BOOTED=0x06\n"
345347
"IPROTO_TUPLE_META=0x2a\n"
346348
"IPROTO_OPTIONS=0x2b\n"
347349
"IPROTO_DATA=0x30\n"
@@ -2291,33 +2293,78 @@ msgstr ""
22912293
"в IPROTO_BALLOT — это элементы ассоциативного массива:"
22922294

22932295
msgid ""
2294-
"IPROTO_BALLOT_IS_RO (0x01) + MP_BOOL\n"
2296+
"IPROTO_BALLOT_IS_RO_CFG (0x01) + MP_BOOL\n"
22952297
"IPROTO_BALLOT_VCLOCK (0x02) + vclock\n"
22962298
"IPROTO_BALLOT_GC_VCLOCK (0x03) + vclock\n"
2297-
"IPROTO_BALLOT_IS_LOADING (0x04) + MP_BOOL\n"
2298-
"IPROTO_BALLOT_IS_ANON = 0x05 + MP_BOOL"
2299+
"IPROTO_BALLOT_IS_RO (0x04) + MP_BOOL\n"
2300+
"IPROTO_BALLOT_IS_ANON = 0x05 + MP_BOOL\n"
2301+
"IPROTO_BALLOT_IS_BOOTED = 0x06 + MP_BOOL"
22992302
msgstr ""
2300-
"IPROTO_BALLOT_IS_RO (0x01) + MP_BOOL\n"
2303+
"IPROTO_BALLOT_IS_RO_CFG (0x01) + MP_BOOL\n"
23012304
"IPROTO_BALLOT_VCLOCK (0x02) + vclock\n"
23022305
"IPROTO_BALLOT_GC_VCLOCK (0x03) + vclock\n"
2303-
"IPROTO_BALLOT_IS_LOADING (0x04) + MP_BOOL\n"
2304-
"IPROTO_BALLOT_IS_ANON = 0x05 + MP_BOOL"
2306+
"IPROTO_BALLOT_IS_RO (0x04) + MP_BOOL\n"
2307+
"IPROTO_BALLOT_IS_ANON = 0x05 + MP_BOOL\n"
2308+
"IPROTO_BALLOT_IS_BOOTED = 0x06 + MP_BOOL"
23052309

23062310
msgid ""
2307-
"IPROTO_BALLOt-IS_ANON corresponds to :ref:`box.cfg.replication_anon "
2308-
"<cfg_replication-replication_anon>`."
2311+
"IPROTO_BALLOT_IS_RO_CFG and IPRO_BALLOT_VCLOCK and IPROTO_BALLOT_GC_VCLOCK "
2312+
"and IPROTO_BALLOT_IS_RO were added in version :doc:`2.6.1 </release/2.6.1>`."
2313+
" IPROTO_BALLOT_IS_ANON was added in version :doc:`2.7.1 </release/2.7.1>`. "
2314+
"IPROTO_BALLOT_IS_BOOTED was added in version 2.7.3 and 2.8.2 and 2.9.1. "
2315+
"There have been some name changes starting with version 2.7.3 and 2.8.2 and "
2316+
"2.9.1: IPROTO_BALLOT_IS_RO_CFG was formerly called IPROTO_BALLOT_IS_RO, and "
2317+
"IPROTO_BALLOT_IS_RO was formerly called IPROTO_BALLOT_IS_LOADING."
2318+
msgstr ""
2319+
"IPROTO_BALLOT_IS_RO_CFG, IPRO_BALLOT_VCLOCK, IPROTO_BALLOT_GC_VCLOCK и "
2320+
"IPROTO_BALLOT_IS_RO добавлены в версии :doc:`2.6.1 </release/2.6.1>`. "
2321+
"Константа IPROTO_BALLOT_IS_ANON добавлена в версии :doc:`2.7.1 "
2322+
"</release/2.7.1>`. Константа IPROTO_BALLOT_IS_BOOTED добавлена в версиях "
2323+
"2.7.3, 2.8.2 и 2.9.1. В версиях 2.7.3, 2.8.2, 2.9.1 и более поздних "
2324+
"константа IPROTO_BALLOT_IS_RO переименована в IPROTO_BALLOT_IS_RO_CFG, а "
2325+
"IPROTO_BALLOT_IS_LOADING — в IPROTO_BALLOT_IS_RO."
2326+
2327+
msgid ""
2328+
"IPROTO_BALLOT_IS_RO_CFG corresponds to :ref:`box.cfg.read_only <cfg_basic-"
2329+
"read_only>`."
2330+
msgstr ""
2331+
"Значение IPROTO_BALLOT_IS_RO_CFG соответствует значению "
2332+
":ref:`box.cfg.read_only <cfg_basic-read_only>`."
2333+
2334+
msgid ""
2335+
"IPROTO_BALLOT_GC_VCLOCK can be the vclock value of the instance's oldest WAL"
2336+
" entry, which corresponds to :ref:`box.info.gc().vclock <box_info_gc>`."
23092337
msgstr ""
2310-
"IPROTO_BALLOT_IS_ANON соответствует :ref:`box.cfg.replication_anon "
2338+
"IPROTO_BALLOT_GC_VCLOCK может принимать значение vclock самой старой записи "
2339+
"журнала WAL на экземпляре. Это соответствует значению "
2340+
":ref:`box.info.gc().vclock <box_info_gc>`."
2341+
2342+
msgid ""
2343+
"IPROTO_BALLOT_IS_RO is true if the instance is not writable, which may "
2344+
"happen for a variety of reasons, such as: it was configured as "
2345+
":ref:`read_only <cfg_basic-read_only>`, or it has :ref:`orphan status "
2346+
"<replication-orphan_status>`, or it is a :ref:`Raft <repl_leader_elect>` "
2347+
"follower."
2348+
msgstr ""
2349+
"IPROTO_BALLOT_IS_RO принимает значение ``true``, если экземпляр недоступен "
2350+
"для записи. Причины у этого могут быть разные: например, экземпляр настроен "
2351+
"как :ref:`read_only <cfg_basic-read_only>`, :ref:`имеет статус orphan "
2352+
"<replication-orphan_status>` или является последователем (follower) при "
2353+
":ref:`выполнении алгоритма Raft <repl_leader_elect>`."
2354+
2355+
msgid ""
2356+
"IPROTO_BALLOT_IS_ANON corresponds to :ref:`box.cfg.replication_anon "
23112357
"<cfg_replication-replication_anon>`."
2358+
msgstr ""
2359+
"Значение IPROTO_BALLOT_IS_ANON соответствует значению "
2360+
":ref:`box.cfg.replication_anon <cfg_replication-replication_anon>`."
23122361

23132362
msgid ""
2314-
"The items other than IPROTO_BALLOT_IS_ANON were added in version :doc:`2.6.1"
2315-
" </release/2.6.1>`. PROTO_BALLOT_IS_ANON was added in version :doc:`2.7.1 "
2316-
"</release/2.7.1>`."
2363+
"IPROTO_BALLOT_IS_BOOTED is true if the instance has finished its bootstrap "
2364+
"or recovery process."
23172365
msgstr ""
2318-
"Элементы, отличные от IPROTO_BALLOT_IS_ANON, были добавлены в версии "
2319-
":doc:`2.6.1 </release/2.6.1>`. PROTO_BALLOT_IS_ANON был добавлен в версии "
2320-
":doc:`2.7.1 </release/2.7.1>`."
2366+
"IPROTO_BALLOT_IS_BOOTED принимает значение ``true``, если экземпляр завершил"
2367+
" инициализацию или восстановление."
23212368

23222369
msgid "**FLAGS**"
23232370
msgstr "**ФЛАГИ**"
@@ -2377,8 +2424,8 @@ msgid ""
23772424
"To follow the examples in this section, get a single Linux computer and "
23782425
"start three command-line shells (\"terminals\")."
23792426
msgstr ""
2380-
"Чтобы выполнить примеры, приведенные в этом разделе, возьмите компьютер с "
2381-
"Linux и запустите три командных оболочки (\"терминалы\")."
2427+
"Чтобы выполнить примеры, приведенные в этом разделе, запустите на компьютере"
2428+
" с Linux три командных оболочки (терминала)."
23822429

23832430
msgid ""
23842431
"-- On terminal #1, Start monitoring port 3302 with `tcpdump "

0 commit comments

Comments
 (0)