Skip to content

Commit 1678547

Browse files
committed
Correct the Streams article
Resolves #2503
1 parent cb92573 commit 1678547

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

doc/book/box/stream.rst

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ a stream transfers data via the protocol between a client and a server.
2929

3030
.. _box_stream-features:
3131

32-
New features
33-
------------
32+
Features
33+
--------
3434

3535
The primary purpose of :term:`streams <stream>` is to execute transactions via iproto.
3636
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.
4545
If a user writes their own connector and wants to use streams,
4646
they must transmit the ``stream_id`` over the iproto protocol.
4747

48+
Streams only work if the ``box.cfg{}`` option :ref:`memtx_use_mvcc_engine <cfg-basic-memtx-use-mvcc-engine>`
49+
is enabled on the server: ``memtx_use_mvcc_engine = true``.
50+
4851
.. _box_stream-interaction:
4952

5053
Interaction between streams and transactions
@@ -63,7 +66,7 @@ that transaction will be rolled back if it hasn't been committed before the conn
6366

6467
Example:
6568

66-
.. code-block:: lua
69+
.. code-block:: lua
6770
6871
local conn = net_box.connect(remote_server_addr)
6972
local conn_space = conn.space.test
@@ -72,15 +75,15 @@ Example:
7275
7376
-- Begin transaction over an iproto stream:
7477
stream:begin()
75-
space:replace({1})
78+
stream_space:replace({1})
7679
7780
-- Empty select, the transaction was not committed.
7881
-- You can't see it from the requests that do not belong to the
7982
-- transaction.
83+
conn_space:select{}
8084
8185
-- Select returns the previously inserted tuple,
8286
-- because this select belongs to the transaction:
83-
conn_space:select{}
8487
stream_space:select({})
8588
8689
-- Commit transaction:

0 commit comments

Comments
 (0)