@@ -277,7 +277,9 @@ the client to check if it has changed.
277
277
278
278
**IPROTO_STREAM_ID ** = 0x0a.
279
279
An unsigned number that should be unique in every stream.
280
- In requests IPROTO_STREAM_ID is optional and is only useful for ensuring that requests within transactions are done in separate groups.
280
+ In requests IPROTO_STREAM_ID is optional and is useful for two things:
281
+ ensuring that requests within transactions are done in separate groups,
282
+ and ensuring strictly consistent execution of requests (whether or not they are within transactions).
281
283
In responses IPROTO_STREAM_ID does not appear.
282
284
See :ref: `Binary protocol -- streams <box_protocol-streams >`.
283
285
@@ -748,7 +750,7 @@ See the later section :ref:`Binary protocol -- streams <box_protocol-streams>`.
748
750
749
751
**IPROTO_COMMIT ** = 0x0f.
750
752
751
- This is for starting a transaction.
753
+ This is for ending a transaction.
752
754
Typically the header will include IPROTO_STREAM_ID.
753
755
The body is: nothing.
754
756
See the later section :ref: `Binary protocol -- streams <box_protocol-streams >`.
@@ -757,7 +759,7 @@ See the later section :ref:`Binary protocol -- streams <box_protocol-streams>`.
757
759
758
760
**IPROTO_ROLLBACK ** = 0x10.
759
761
760
- This is for starting a transaction.
762
+ This is for ending a transaction.
761
763
Typically the header will include IPROTO_STREAM_ID.
762
764
The body is: nothing.
763
765
See the later section :ref: `Binary protocol -- streams <box_protocol-streams >`.
@@ -1220,7 +1222,8 @@ function ``netbox_encode_auth``.
1220
1222
Binary protocol -- streams
1221
1223
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1222
1224
1223
- The streams feature, which was added in Tarantool version
1225
+ The :ref: `Streams and interactive transactions <box_stream >`
1226
+ feature, which was added in Tarantool version
1224
1227
:tarantool-release: `2.10.0-beta1 `, allows two things:
1225
1228
sequential processing and interleaving.
1226
1229
@@ -1229,12 +1232,13 @@ With streams there is a guarantee that the server instance will not
1229
1232
handle the next request in a stream until it has completed the previous one.
1230
1233
1231
1234
Interleaving:
1232
- A series of requests can include
1233
- "insert for stream #1", "insert for stream #2", "delete for stream #2", "delete
1234
- for stream #1", and then a "commit for stream #1" which the server instance will
1235
- interpret as a request to handle only the two inserts for stream #1 .
1235
+ For example, a series of requests can include
1236
+ "begin for stream #1", "begin for stream #2",
1237
+ "insert for stream #1", "insert for stream #2", "delete
1238
+ for stream #1", "commit for stream #1", "rollback for stream #2" .
1236
1239
1237
1240
To make these things possible,
1241
+ the engine should be :ref: `vinyl <engines-vinyl >` or :ref: `memtx with mvcc <cfg_basic-memtx_use_mvcc_engine >`, and
1238
1242
the client is responsible for ensuring that the stream identifier,
1239
1243
unsigned integer :ref: `IPROTO_STREAM_ID <box_protocol-iproto_stream_id >`, is in the request header.
1240
1244
IPROTO_STREAM_ID can be any positive 64-bit number, and should be unique for the connection.
0 commit comments