Skip to content

Commit ca1a72a

Browse files
Change iproto and box.session.push re out-of-band (#2700)
* Clarify out-of-band request response behavior in iproto and box.session.push descriptions * Update translations Co-authored-by: Patience Daur <[email protected]>
1 parent 9834439 commit ca1a72a

File tree

4 files changed

+35
-6
lines changed

4 files changed

+35
-6
lines changed

doc/dev_guide/internals/box_protocol.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,13 @@ The IPROTO constants that appear within requests or responses that we will descr
135135
IPROTO_FIELD_IS_NULLABLE=0x03
136136
IPROTO_FIELD_IS_AUTOINCREMENT=0x04
137137
IPROTO_FIELD_SPAN=0x05
138+
IPROTO_CHUNK=0x80
138139
IPROTO_RAFT_TERM=0x00
139140
IPROTO_RAFT_VOTE=0x01
140141
IPROTO_RAFT_STATE=0x02
141142
IPROTO_RAFT_VCLOCK=0x03
142143
144+
143145
To denote message descriptions we will say ``msgpack(...)`` and within it we will use modified
144146
`YAML <https://en.wikipedia.org/wiki/YAML>`_ so: |br|
145147

@@ -866,6 +868,14 @@ so if we were using net_box we could decode with
866868
or we could convert to a string with :samp:`ffi.string({pointer},{length})`.
867869
The :ref:`pickle.unpack() <pickle-unpack>` function might also be helpful.
868870

871+
.. _box_protocol-responses_out_of_band:
872+
873+
Responses for no error and out-of-band
874+
--------------------------------------
875+
876+
If the response is out-of-band, due to use of
877+
:ref:`box.session.push() <box_session-push>`,
878+
then the header Response-Code-Indicator will be IPROTO_CHUNK instead of IPROTO_OK.
869879

870880
.. _box_protocol-responses_error:
871881

doc/reference/reference_lua/box_session/push.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ box.session.push()
3737
* If the result is not an error, then the return is the boolean value ``true``.
3838
* When the return is ``true``, the message has gone to the network
3939
buffer as a :ref:`packet <box_protocol-iproto_protocol>`
40-
with the code IPROTO_CHUNK (0x80).
40+
with a different :ref:`header code <box_protocol-responses_out_of_band>`
41+
so the client can distinguish from an ordinary Okay response.
4142

4243
The server's sole job is to call ``box.session.push()``, there is no
4344
automatic mechanism for showing that the message was received.
@@ -139,4 +140,4 @@ box.session.push()
139140
-- - *0
140141
-- ...
141142
-- Good. That shows that the message was asynchronous, and
142-
-- that box.session.push() did its job.
143+
-- that box.session.push() did its job.

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1548,6 +1548,16 @@ msgstr ""
15481548
":samp:`ffi.string({pointer},{length})`. Также здесь можно использовать "
15491549
"функцию :ref:`pickle.unpack() <pickle-unpack>`."
15501550

1551+
msgid "Responses for no error and out-of-band"
1552+
msgstr "Ответы на внеполосные сообщения"
1553+
1554+
msgid "If the response is out-of-band, due to use of"
1555+
" :ref:`box.session.push() <box_session-push>`,"
1556+
" then the header Response-Code-Indicator will be IPROTO_CHUNK instead of IPROTO_OK."
1557+
msgstr "Если используется :ref:`box.session.push() <box_session-push>`,"
1558+
" значением заголовка Response-Code-Indicator для внеполосных сообщений "
1559+
"будет IPROTO_CHUNK, а не IPROTO_OK."
1560+
15511561
msgid ""
15521562
"For a response other than IPROTO_OK, the header Response-Code-Indicator will"
15531563
" be ``0x8XXX`` and the body will be a 1-item map."

locale/ru/LC_MESSAGES/reference/reference_lua/box_session/push.po

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,12 @@ msgid ""
3535
"Tarantool version :doc:`2.4.2 </release/2.4.2>`, ``sync`` is **deprecated** "
3636
"and its use will cause a warning. Since version 2.5.1, its use will cause an"
3737
" error."
38-
msgstr ""
38+
msgstr "необязательный аргумент, указывающий на сессию. Этот аргумент "
39+
"берётся из предшествующего вызова :doc:`/reference/reference_lua/box_session/sync`."
40+
" Если аргумент опущен, применяется значение по умолчанию --- "
41+
"текущее значение ``box.session.sync()``. Аргумент признан устаревшим "
42+
"в версии Tarantool :doc:`2.4.2 </release/2.4.2>`, а начиная с версии 2.5.1 "
43+
"его использование приводит к ошибке."
3944

4045
msgid "rtype"
4146
msgstr "тип возвращаемого значения"
@@ -58,11 +63,14 @@ msgstr ""
5863

5964
msgid ""
6065
"When the return is ``true``, the message has gone to the network buffer as a"
61-
" :ref:`packet <box_protocol-iproto_protocol>` with the code IPROTO_CHUNK "
62-
"(0x80)."
66+
" :ref:`packet <box_protocol-iproto_protocol>` "
67+
"with a different :ref:`header code <box_protocol-responses_out_of_band>` "
68+
"so the client can distinguish from an ordinary Okay response."
6369
msgstr ""
6470
"Если возвращается ``true``, сообщение отправлено в буфер сети в виде "
65-
":ref:`пакета <box_protocol-iproto_protocol>` с кодом IPROTO_CHUNK (0x80)."
71+
":ref:`пакета <box_protocol-iproto_protocol>` "
72+
"с другим :ref:`кодом заголовка <box_protocol-responses_out_of_band>`, "
73+
"и клиент может отличить такой ответ от обычного подтверждения."
6674

6775
msgid ""
6876
"The server's sole job is to call ``box.session.push()``, there is no "

0 commit comments

Comments
 (0)