Description
Fix an error in the example, make a small correction to the article
Product: Tarantool
Root document: https://www.tarantool.io/en/doc/latest/book/box/stream/
SME: @ EvgenyMekhanik
Details
-
space:replace({1})
->stream_space:replace({1})
. - The
Empty select
comment is aboutconn_space:select({})
, please make it obvious. - Specify in the article that
memtx_use_mvcc_engine
must be defined astrue
on the server. - Add @ EvgenyMekhanik as a reviewer.
<…>ream = conn:new_stream()
local stream_space = stream.space.test
**|
-- Begin transaction over an iproto stream:
stream:begin()
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.-- Select returns the previously inserted tuple,
-- because this select belongs to the transaction:
conn_space:select{}
stream_space:select({})-- Commit transaction:
stream:commit()-- Now this select also returns the tuple, because the transaction has been committed:
conn_space:select{}|**<…>
https://www.tarantool.io/en/doc/latest/book/box/stream/
там надо space:replace({1}) заменить на stream_space:replace({1}), еще комментарий Empty select относится к conn_space:select({})
Можно еще указать, что memtx_use_mvcc_engine на сервере должен быть true