Description
Product: Tarantool
Since: 2.10.0-beta1
Root document: https://www.tarantool.io/en/doc/latest/dev_guide/internals/box_protocol/
https://www.tarantool.io/en/doc/latest/book/box/atomic/
SME: @ EvgenyMekhanik
Details
The main purpose of streams is transactions via iproto. Each stream
can start its own transaction, so they allows multiplexing several
transactions over one connection. There are multiple ways to begin,
commit and rollback transaction: using IPROTO_CALL and IPROTO_EVAL
with corresponding function (box.begin, box.commit and box.rollback),
IPROTO_EXECUTE with corresponding sql request ('TRANSACTION START',
'COMMIT', 'ROLLBACK') and IPROTO_BEGIN, IPROTO_COMMIT, IPROTO_ROLLBACK
accordingly. If disconnect occurs when there is some active transaction
in stream, this transaction will be rollbacked, if it does not have time
to commit before this moment. Add new command codes for begin, commit and
rollback transactions: IPROTO_BEGIN 14
, IPROTO_COMMIT 15
and
IPROTO_ROLLBACK 16
accordingly. This commands have empty bodies.
Requested by @EvgenyMekhanik in tarantool/tarantool@48c8dc1.