From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 34A3B6EC40; Tue, 10 Aug 2021 11:44:01 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 34A3B6EC40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1628585041; bh=D//S+QsWvp/tYoFOn6B38rNCU8cypHmmgslJB6dDAHc=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=nFrBhOEfudTtDN52oLbtJ+MtVFUt2AeOHDNJp45QtFosWjYi3va8VjHpXS3RJzQ6l xI4lj4R2axDPwqi+SAEOxkaP8wX1dFr1W8MPCAsNY+zTSdxDX6nk7SFgkv5Cg/vWmW j8C78VO6AcfFWtuXtXIbGQRmEjx10QPBRiUhn9+k= Received: from smtp52.i.mail.ru (smtp52.i.mail.ru [94.100.177.112]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 47DBC6EC40 for ; Tue, 10 Aug 2021 11:44:00 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 47DBC6EC40 Received: by smtp52.i.mail.ru with esmtpa (envelope-from ) id 1mDNMc-0008Vl-SF; Tue, 10 Aug 2021 11:43:59 +0300 To: tarantool-patches@dev.tarantool.org, vdavydov@tarantool.org, v.shpilevoy@tarantool.org Date: Tue, 10 Aug 2021 11:43:57 +0300 Message-Id: X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD92087353F0EC44DD906AB4890CDABF0C5CB76CEE71D3E4007182A05F53808504009E1183FD04602422427AFE6C3D17C9B818C044D01345B0EF0EB82A16EA7DE54 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7922E451CE6E839B1EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063748C26B83F2B024408638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8182D1CA090A327239A64FC5AE4C411F9117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCE4E369F5EA069656A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F4460429728776938767073520140C956E756FBB7ABDFBBEFFF4125B51D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EEB89ED3C7A6281781C67AC315686ED4D3D8FC6C240DEA7642DBF02ECDB25306B2B78CF848AE20165D0A6AB1C7CE11FEE3B6617C399FBFD4B4040F9FF01DFDA4A8C4224003CC836476EA7A3FFF5B025636E2021AF6380DFAD1A18204E546F3947CB11811A4A51E3B096D1867E19FE1407959CC434672EE6371089D37D7C0E48F6C8AA50765F7900637742364C369F68A8BEFF80C71ABB335746BA297DBC24807EABDAD6C7F3747799A X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8183A4AFAF3EA6BDC44E1F4276B809941966B668463F4F89F8670B41A61D6E0ACBFF5CB931E38339CD39C2B6934AE262D3EE7EAB7254005DCED47FEBE06C96CBF781E0A4E2319210D9B64D260DF9561598FCFFBF5018520E398B66DA94168EAEAEF8E8E86DC7131B365E7726E8460B7C23C X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3498EF79680EE3725CD021604249319C0358063932AF9046A0FA12362BFFB461C213A5EB62E41E70A41D7E09C32AA3244C58A7FF2ABDE84D0816EAE6DF71E646B035DA7DC5AF9B58C0927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojGhQhWEp1aB98k4450OXrew== X-Mailru-Sender: 583F1D7ACE8F49BD29FC049B2A5BF963FAF664699D30E24A92477512C5B40E3640D7ACCE271F7D3FB79567116EAC6FCF4E830D9205DBEA545646F0D3C63A617F27ACC94E9A535D22112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: [Tarantool-patches] [PATCH v2 0/8] implement iproto streams X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: mechanik20051988 via Tarantool-patches Reply-To: mechanik20051988 Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" branch: https://github.com/tarantool/tarantool/tree/mechanik20051988/gh-5860-iproto-streams-v1 pr: https://github.com/tarantool/tarantool/pull/6139 Changes in v2: 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 | 142 +- src/box/lua/net_box.lua | 247 +- 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, 5885 insertions(+), 240 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