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 F32256EC40; Wed, 11 Aug 2021 11:57:02 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org F32256EC40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1628672223; bh=HqKxXAJvPWcHK5n8SIMCAEwkUVI0MlCbZgWcV7RPItQ=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=R8I0ojWfHTQUX4ma7oob09C+mVaPMpEdJhT8J5kwjnpphBVUgYciIBzWnK7TCgUvt iYH+kXSCS+rpSB/Uk4bL/fYq3JCGA4V84SKtmIhYbvt9+8Hn1usfSl7U4In87PIJ+X 2SiiI0RUD6DFskScreko/3txLU6Ix4rcfXDMjpbY= Received: from smtp39.i.mail.ru (smtp39.i.mail.ru [94.100.177.99]) (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 BA7526EC40 for ; Wed, 11 Aug 2021 11:57:01 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org BA7526EC40 Received: by smtp39.i.mail.ru with esmtpa (envelope-from ) id 1mDk2m-0005BM-8g; Wed, 11 Aug 2021 11:57:00 +0300 To: tarantool-patches@dev.tarantool.org, vdavydov@tarantool.org, v.shpilevoy@tarantool.org Date: Wed, 11 Aug 2021 11:56:50 +0300 Message-Id: X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD92087353F0EC44DD9736CF3E71F18CE0C3E1D5927724F4AAA182A05F5380850400C9EC88F4BB05EC2078DEBA08261DE934176AA346F2C70CAF20684334041F22A X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE75DF2B1F23425CAE5EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637FDB3827A455F08028638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D886374AA354A665EE7DF3290FA76A1222117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC3E01324A399D06B1A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F4460429728776938767073520B1593CA6EC85F86DBDFBBEFFF4125B51D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EEB89ED3C7A628178186750DBF4DC650F2D8FC6C240DEA7642DBF02ECDB25306B2B78CF848AE20165D0A6AB1C7CE11FEE3B6617C399FBFD4B4040F9FF01DFDA4A8C4224003CC836476EA7A3FFF5B025636E2021AF6380DFAD1A18204E546F3947CB11811A4A51E3B096D1867E19FE1407959CC434672EE6371089D37D7C0E48F6C8AA50765F7900637B5EAED125435346EEFF80C71ABB335746BA297DBC24807EABDAD6C7F3747799A X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8183A4AFAF3EA6BDC44E1F4276B809941966B668463F4F89F86FF8453BF905E14C42624F11523E21FF49C2B6934AE262D3EE7EAB7254005DCED47FEBE06C96CBF781E0A4E2319210D9B64D260DF9561598F01A9E91200F654B034E77992DA01BB408E8E86DC7131B365E7726E8460B7C23C X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34F8A2DF183797A6A81A63F0A2D3163373648D116E22E39D3BD31F89B0CDD12E7872975729F72CDD6B1D7E09C32AA3244CD0F929E5A1BF473CCECD68B628CAD0617C0C08F7987826B9927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2bioj6qlzQV0oSZPP3VRkC+nWvQ== X-Mailru-Sender: 583F1D7ACE8F49BD29FC049B2A5BF9632710EBCDEE68D686A3B25A8478BC08F852D379300B091A86B79567116EAC6FCF4E830D9205DBEA545646F0D3C63A617F27ACC94E9A535D22112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: [Tarantool-patches] [PATCH v3 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 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