From 167854764deb1d42d6701ecefe35b7f11257749a Mon Sep 17 00:00:00 2001 From: Patience Daur Date: Thu, 3 Mar 2022 14:55:55 +0300 Subject: [PATCH 1/6] Correct the Streams article Resolves #2503 --- doc/book/box/stream.rst | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/doc/book/box/stream.rst b/doc/book/box/stream.rst index f27d1692b8..7a75643859 100644 --- a/doc/book/box/stream.rst +++ b/doc/book/box/stream.rst @@ -29,8 +29,8 @@ a stream transfers data via the protocol between a client and a server. .. _box_stream-features: -New features ------------- +Features +-------- The primary purpose of :term:`streams ` is to execute transactions via iproto. Every stream has its own identifier, which is unique within the connection. @@ -45,6 +45,9 @@ The ID is generated on the client side automatically. If a user writes their own connector and wants to use streams, they must transmit the ``stream_id`` over the iproto protocol. +Streams only work if the ``box.cfg{}`` option :ref:`memtx_use_mvcc_engine ` +is enabled on the server: ``memtx_use_mvcc_engine = true``. + .. _box_stream-interaction: Interaction between streams and transactions @@ -63,7 +66,7 @@ that transaction will be rolled back if it hasn't been committed before the conn Example: -.. code-block:: lua +.. code-block:: lua local conn = net_box.connect(remote_server_addr) local conn_space = conn.space.test @@ -72,15 +75,15 @@ Example: -- Begin transaction over an iproto stream: stream:begin() - space:replace({1}) + stream_space:replace({1}) -- Empty select, the transaction was not committed. -- You can't see it from the requests that do not belong to the -- transaction. + conn_space:select{} -- Select returns the previously inserted tuple, -- because this select belongs to the transaction: - conn_space:select{} stream_space:select({}) -- Commit transaction: From 22d0998b5e4b773ad6fdcf5627682de54c54bfe1 Mon Sep 17 00:00:00 2001 From: Patience Daur Date: Wed, 9 Mar 2022 09:37:39 +0300 Subject: [PATCH 2/6] Fix link --- doc/book/box/stream.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/book/box/stream.rst b/doc/book/box/stream.rst index 7a75643859..589a8287c6 100644 --- a/doc/book/box/stream.rst +++ b/doc/book/box/stream.rst @@ -45,7 +45,7 @@ The ID is generated on the client side automatically. If a user writes their own connector and wants to use streams, they must transmit the ``stream_id`` over the iproto protocol. -Streams only work if the ``box.cfg{}`` option :ref:`memtx_use_mvcc_engine ` +Streams only work if the ``box.cfg{}`` option :ref:`memtx_use_mvcc_engine ` is enabled on the server: ``memtx_use_mvcc_engine = true``. .. _box_stream-interaction: From ac6483f625f897b2987650311c7716c902af0809 Mon Sep 17 00:00:00 2001 From: patiencedaur Date: Wed, 9 Mar 2022 07:06:44 +0000 Subject: [PATCH 3/6] Update translations --- locale/ru/LC_MESSAGES/book/box/stream.po | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/locale/ru/LC_MESSAGES/book/box/stream.po b/locale/ru/LC_MESSAGES/book/box/stream.po index 719f137874..616b169e43 100644 --- a/locale/ru/LC_MESSAGES/book/box/stream.po +++ b/locale/ru/LC_MESSAGES/book/box/stream.po @@ -46,8 +46,8 @@ msgstr "" "целиком в рамках одного запроса. ``begin``, ``commit`` и другие TX-" "инструкции могут быть отправлены и выполнены в разных запросах." -msgid "New features" -msgstr "Новые функциональные возможности" +msgid "Features" +msgstr "Функциональные возможности" msgid "" "The primary purpose of :term:`streams ` is to execute transactions " @@ -80,6 +80,15 @@ msgstr "" "поддержкой стримов. Используя стримы с пользовательским коннектором, " "необходимо передавать ``stream_id`` через протокол iproto." +msgid "" +"Streams only work if the ``box.cfg{}`` option :ref:`memtx_use_mvcc_engine " +"` is enabled on the server: " +"``memtx_use_mvcc_engine = true``." +msgstr "" +"Для работы стримов необходимо включить параметр ``box.cfg{}`` :ref: " +"`memtx_use_mvcc_engine ` на сервере: " +"``memtx_use_mvcc_engine = true``." + msgid "Interaction between streams and transactions" msgstr "Взаимодействие между стримами и транзакциями" @@ -122,15 +131,15 @@ msgid "" "\n" "-- Begin transaction over an iproto stream:\n" "stream:begin()\n" -"space:replace({1})\n" +"stream_space:replace({1})\n" "\n" "-- Empty select, the transaction was not committed.\n" "-- You can't see it from the requests that do not belong to the\n" "-- transaction.\n" +"conn_space:select{}\n" "\n" "-- Select returns the previously inserted tuple,\n" "-- because this select belongs to the transaction:\n" -"conn_space:select{}\n" "stream_space:select({})\n" "\n" "-- Commit transaction:\n" @@ -146,7 +155,7 @@ msgstr "" "\n" "-- Начать транзакцию через поток iproto:\n" "stream:begin()\n" -"space:replace({1})\n" +"stream_space:replace({1})\n" "\n" "-- Пустой select, коммит транзакции не выполнен.\n" "-- Ее нельзя увидеть из запросов, не относящихся\n" From c1ecc667d4ff1c169036fdd2ff7d988c9ad060c0 Mon Sep 17 00:00:00 2001 From: Patience Daur Date: Wed, 9 Mar 2022 10:55:21 +0300 Subject: [PATCH 4/6] Corrections after review --- doc/book/box/stream.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/book/box/stream.rst b/doc/book/box/stream.rst index 589a8287c6..7ce95e48c9 100644 --- a/doc/book/box/stream.rst +++ b/doc/book/box/stream.rst @@ -45,7 +45,8 @@ The ID is generated on the client side automatically. If a user writes their own connector and wants to use streams, they must transmit the ``stream_id`` over the iproto protocol. -Streams only work if the ``box.cfg{}`` option :ref:`memtx_use_mvcc_engine ` +Interactive transactions over streams only work if +the ``box.cfg{}`` option :ref:`memtx_use_mvcc_engine ` is enabled on the server: ``memtx_use_mvcc_engine = true``. .. _box_stream-interaction: From 8eedd4a76f05b9a7aa1eabc6b35083b711563dc1 Mon Sep 17 00:00:00 2001 From: patiencedaur Date: Wed, 9 Mar 2022 08:17:18 +0000 Subject: [PATCH 5/6] Update translations --- locale/ru/LC_MESSAGES/book/box/stream.po | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/locale/ru/LC_MESSAGES/book/box/stream.po b/locale/ru/LC_MESSAGES/book/box/stream.po index 616b169e43..c7ad953f6e 100644 --- a/locale/ru/LC_MESSAGES/book/box/stream.po +++ b/locale/ru/LC_MESSAGES/book/box/stream.po @@ -81,13 +81,13 @@ msgstr "" "необходимо передавать ``stream_id`` через протокол iproto." msgid "" -"Streams only work if the ``box.cfg{}`` option :ref:`memtx_use_mvcc_engine " -"` is enabled on the server: " -"``memtx_use_mvcc_engine = true``." +"Interactive transactions over streams only work if the ``box.cfg{}`` option " +":ref:`memtx_use_mvcc_engine ` is enabled on" +" the server: ``memtx_use_mvcc_engine = true``." msgstr "" -"Для работы стримов необходимо включить параметр ``box.cfg{}`` :ref: " -"`memtx_use_mvcc_engine ` на сервере: " -"``memtx_use_mvcc_engine = true``." +"Чтобы в стримах работали интерактивные транзакции, необходимо включить " +"параметр ``box.cfg{}`` :ref: `memtx_use_mvcc_engine ` на сервере: ``memtx_use_mvcc_engine = true``." msgid "Interaction between streams and transactions" msgstr "Взаимодействие между стримами и транзакциями" From 359696ad90b471b6f4966ecc2a093a0eabdde9af Mon Sep 17 00:00:00 2001 From: patiencedaur Date: Wed, 9 Mar 2022 08:58:41 +0000 Subject: [PATCH 6/6] Update translations --- locale/ru/LC_MESSAGES/book/box/stream.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locale/ru/LC_MESSAGES/book/box/stream.po b/locale/ru/LC_MESSAGES/book/box/stream.po index c7ad953f6e..ff17a8e8d4 100644 --- a/locale/ru/LC_MESSAGES/book/box/stream.po +++ b/locale/ru/LC_MESSAGES/book/box/stream.po @@ -86,7 +86,7 @@ msgid "" " the server: ``memtx_use_mvcc_engine = true``." msgstr "" "Чтобы в стримах работали интерактивные транзакции, необходимо включить " -"параметр ``box.cfg{}`` :ref: `memtx_use_mvcc_engine ` на сервере: ``memtx_use_mvcc_engine = true``." msgid "Interaction between streams and transactions"