Skip to content

feedback: Streams and interactive transactions | Example error #2503

Closed
@TarantoolBot

Description

@TarantoolBot

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 about conn_space:select({}), please make it obvious.
  • Specify in the article that memtx_use_mvcc_engine must be defined as true 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

Metadata

Metadata

Assignees

Labels

add details[nature] More details needed, some info missing. Documentation is incomplete.exampleProblem with a code example.factual errorFactual error in functionality descriptionserver[area] Task relates to Tarantool's server (core) functionality

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions