diff --git a/doc/book/box/stream.rst b/doc/book/box/stream.rst index f27d1692b8..7ce95e48c9 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,10 @@ 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. +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: Interaction between streams and transactions @@ -63,7 +67,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 +76,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: diff --git a/locale/ru/LC_MESSAGES/book/box/stream.po b/locale/ru/LC_MESSAGES/book/box/stream.po index 719f137874..ff17a8e8d4 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 "" +"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``." + 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"