From: Vladimir Davydov via Tarantool-patches <tarantool-patches@dev.tarantool.org> To: mechanik20051988 <mechanik20051988@tarantool.org> Cc: tarantool-patches@dev.tarantool.org, v.shpilevoy@tarantool.org, mechanik20051988 <mechanik20.05.1988@gmail.com> Subject: Re: [Tarantool-patches] [PATCH v3 6/8] net.box: add stream support to net.box Date: Wed, 11 Aug 2021 15:09:10 +0300 [thread overview] Message-ID: <20210811120910.2y4aycdn5giqmyvd@esperanza> (raw) In-Reply-To: <56db4eea5c868187e151658427e1a6d65736771a.1628671235.git.mechanik20051988@tarantool.org> On Wed, Aug 11, 2021 at 11:56:56AM +0300, mechanik20051988 wrote: > From: mechanik20051988 <mechanik20.05.1988@gmail.com> > > Add stream support to `net.box`. In "net.box", stream > is an object over connection that has the same methods, > but all requests from it sends with non-zero stream ID. > Since there can be a lot of streams, we do not copy the > spaces from the connection to the stream immediately when > creating a stream, but do it only when we first access space. > Also, when updating the schema, we update the spaces in lazy > mode: each stream has it's own schema_version, when there is > some access to stream space we compare stream schema_version > and connection schema_version and if they are different update > clear stream space cache and wrap space that is being accessed > to stream cache. > > Part of #5860 > > @TarantoolBot document > Title: stream support was added to net.box > In "net.box", stream is an object over connection that > has the same methods, but all requests from it sends > with non-zero stream ID. Stream ID is generated on the > client automatically. Simple example of stream creation > using net.box: > ```lua > stream = conn:new_stream() > -- all connection methods are valid, but send requests > -- with non zero stream_id. > ``` > --- > src/box/lua/net_box.c | 95 ++-- > src/box/lua/net_box.lua | 205 ++++++-- > test/box/access.result | 6 +- > test/box/access.test.lua | 6 +- > ...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 | 485 ++++++++++++++++++ > test/box/stream.test.lua | 182 +++++++ Please come up with a better test name. 'Stream' is way too generic. Should be at least net.box.streams. > test/box/suite.ini | 2 +- > 16 files changed, 934 insertions(+), 92 deletions(-) > create mode 100644 test/box/stream.lua > create mode 100644 test/box/stream.result > create mode 100644 test/box/stream.test.lua
next prev parent reply other threads:[~2021-08-11 12:09 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-08-11 8:56 [Tarantool-patches] [PATCH v3 0/8] implement iproto streams mechanik20051988 via Tarantool-patches 2021-08-11 8:56 ` [Tarantool-patches] [PATCH v3 1/8] xrow: remove unused call_request::header mechanik20051988 via Tarantool-patches 2021-08-11 8:56 ` [Tarantool-patches] [PATCH v3 2/8] iproto: clear request::header for client requests mechanik20051988 via Tarantool-patches 2021-08-11 8:56 ` [Tarantool-patches] [PATCH v3 3/8] iproto: implement stream id in binary iproto protocol mechanik20051988 via Tarantool-patches 2021-08-11 8:56 ` [Tarantool-patches] [PATCH v3 4/8] salad: fix segfault in case when mhash table allocation failure mechanik20051988 via Tarantool-patches 2021-08-11 8:56 ` [Tarantool-patches] [PATCH v3 5/8] iproto: implement streams in iproto mechanik20051988 via Tarantool-patches 2021-08-11 11:30 ` Vladimir Davydov via Tarantool-patches 2021-08-11 8:56 ` [Tarantool-patches] [PATCH v3 6/8] net.box: add stream support to net.box mechanik20051988 via Tarantool-patches 2021-08-11 11:52 ` Vladimir Davydov via Tarantool-patches 2021-08-11 12:09 ` Vladimir Davydov via Tarantool-patches [this message] 2021-08-11 8:56 ` [Tarantool-patches] [PATCH v3 7/8] iproto: implement interactive transactions over iproto streams mechanik20051988 via Tarantool-patches 2021-08-11 12:39 ` Vladimir Davydov via Tarantool-patches 2021-08-11 8:56 ` [Tarantool-patches] [PATCH v3 8/8] net.box: add interactive transaction support in net.box mechanik20051988 via Tarantool-patches 2021-08-11 12:47 ` Vladimir Davydov via Tarantool-patches
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210811120910.2y4aycdn5giqmyvd@esperanza \ --to=tarantool-patches@dev.tarantool.org \ --cc=mechanik20.05.1988@gmail.com \ --cc=mechanik20051988@tarantool.org \ --cc=v.shpilevoy@tarantool.org \ --cc=vdavydov@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH v3 6/8] net.box: add stream support to net.box' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox