[Tarantool-patches] [PATCH v3 0/8] implement iproto streams

mechanik20051988 mechanik20051988 at tarantool.org
Wed Aug 11 11:56:50 MSK 2021


branch: https://github.com/tarantool/tarantool/tree/mechanik20051988/gh-5860-iproto-streams-v1
pr: https://github.com/tarantool/tarantool/pull/6139

Changes in v3: Rebase on master
1, 2: First two commits was send in other patch but they are necessary for this patchset.
3, 4: Third and fourth commits was approved and therefore are missing
5: - change ER_UNABLE_TO_PROCESS_IN_STREAM errcode message to make
     it user-friendly, using `iproto_type_name` function.
   - change 'stream_pool' to 'iproto_stream_pool'..
   - add TODO with issue reference for 'errinj'.
   - remove extra new line
   - remove code related to streams from net_send_message into
     separate function 'iproto_msg_finish_processing_in_stream'.
   - rename 'iproto_message_set_stream' to 'iproto_msg_start_processing_in_stream' to
     be consistend with 'iproto_msg_finish_processing_in_stream'.
6: - implement same serialization for stream object as for connection, but with
     visible stream_id.
   - implement same serialization for all objects inside the stream as for
     for all objects inside connection. Minor differences may be due to
     https://github.com/tarantool/tarantool/issues/3228
   - create issue to investigate auto-completion
     https://github.com/tarantool/tarantool/issues/6305
   - removed the mentions of "manual" stream_id.
   - change 'stream' to 'new_stream' anywhere.
   - remove stream_id from IPROTO_AUTH.
   - remove 'stream_methods' table.
   - remove '_streams' table.
   - create new stream when 'new_stream' method called for
     stream object Instead of raise error.
   - ! It is necessary to pass `self._stream_id` through all
     the net.box methods, because for spaces and indexes 'self'
     object in `_request` method is 'remote', which have no
     stream_id.
7: - change ER_UNABLE_TO_PROCESS_OUT_OF_STREAM errcode message to make
     it user-friendly, using `iproto_type_name` function.
   - remove 'IPROTO_TRANSACTION_*' from dml route, does not decode there
     bodyes.
   - remove `msg->header.is_commit` from patchset, it is not necessary now
   - add all changes related to transactions to this patch: implement
     'txn_attach' fucntion, rework 'txn_detach'. Call them in one place.
   - Call 'txn_end_msg' at the end om processing message in all fucntions.
   - Moved transaction-related checks from 'box_process_call' and 'box_process_eval'
     to iproto.
8: - removed the mentions of "manual" stream_id.
   - change 'stream' to 'new_stream' anywhere.
   - rework begin, commit and rollback methods: now they are
     not used 'nothing_or_data'.

Vladimir Davydov (2):
  xrow: remove unused call_request::header
  iproto: clear request::header for client requests

mechanik20051988 (6):
  iproto: implement stream id in binary iproto protocol
  salad: fix segfault in case when mhash table allocation failure
  iproto: implement streams in iproto
  net.box: add stream support to net.box
  iproto: implement interactive transactions over iproto streams
  net.box: add interactive transaction support in net.box

 .../gh-5860-implement-streams-in-iproto.md    |   26 +
 src/box/call.c                                |   12 -
 src/box/errcode.h                             |    2 +
 src/box/iproto.cc                             |  471 ++-
 src/box/iproto_constants.c                    |   10 +-
 src/box/iproto_constants.h                    |    7 +
 src/box/lua/net_box.c                         |  144 +-
 src/box/lua/net_box.lua                       |  240 +-
 src/box/txn.c                                 |   22 +
 src/box/txn.h                                 |   19 +
 src/box/xrow.c                                |    9 +-
 src/box/xrow.h                                |    9 +-
 src/lib/core/errinj.h                         |    2 +
 src/lib/salad/mhash.h                         |   99 +-
 test/box-tap/feedback_daemon.test.lua         |    2 +-
 test/box/access.result                        |    6 +-
 test/box/access.test.lua                      |    6 +-
 test/box/errinj.result                        |    2 +
 test/box/error.result                         |    2 +
 test/box/misc.result                          |    5 +-
 ...net.box_console_connections_gh-2677.result |    2 +-
 ...t.box_console_connections_gh-2677.test.lua |    2 +-
 .../net.box_incorrect_iterator_gh-841.result  |    4 +-
 ...net.box_incorrect_iterator_gh-841.test.lua |    4 +-
 test/box/net.box_iproto_hangs_gh-3464.result  |    2 +-
 .../box/net.box_iproto_hangs_gh-3464.test.lua |    2 +-
 .../net.box_long-poll_input_gh-3400.result    |    8 +-
 .../net.box_long-poll_input_gh-3400.test.lua  |    8 +-
 test/box/stream.lua                           |   13 +
 test/box/stream.result                        | 3415 +++++++++++++++++
 test/box/stream.test.lua                      | 1384 +++++++
 test/box/suite.ini                            |    2 +-
 test/unit/mhash_body.c                        |    4 +-
 test/unit/xrow.cc                             |    7 +-
 test/unit/xrow.result                         |  168 +-
 35 files changed, 5882 insertions(+), 238 deletions(-)
 create mode 100644 changelogs/unreleased/gh-5860-implement-streams-in-iproto.md
 create mode 100644 test/box/stream.lua
 create mode 100644 test/box/stream.result
 create mode 100644 test/box/stream.test.lua

--
2.20.1



More information about the Tarantool-patches mailing list