net.box: add stream support to net.box
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. ```
Showing
- src/box/lua/net_box.c 56 additions, 39 deletionssrc/box/lua/net_box.c
- src/box/lua/net_box.lua 175 additions, 30 deletionssrc/box/lua/net_box.lua
- test/box/access.result 3 additions, 3 deletionstest/box/access.result
- test/box/access.test.lua 3 additions, 3 deletionstest/box/access.test.lua
- test/box/iproto_streams.lua 13 additions, 0 deletionstest/box/iproto_streams.lua
- test/box/net.box_console_connections_gh-2677.result 1 addition, 1 deletiontest/box/net.box_console_connections_gh-2677.result
- test/box/net.box_console_connections_gh-2677.test.lua 1 addition, 1 deletiontest/box/net.box_console_connections_gh-2677.test.lua
- test/box/net.box_incorrect_iterator_gh-841.result 2 additions, 2 deletionstest/box/net.box_incorrect_iterator_gh-841.result
- test/box/net.box_incorrect_iterator_gh-841.test.lua 2 additions, 2 deletionstest/box/net.box_incorrect_iterator_gh-841.test.lua
- test/box/net.box_iproto_hangs_gh-3464.result 1 addition, 1 deletiontest/box/net.box_iproto_hangs_gh-3464.result
- test/box/net.box_iproto_hangs_gh-3464.test.lua 1 addition, 1 deletiontest/box/net.box_iproto_hangs_gh-3464.test.lua
- test/box/net.box_iproto_streams.result 473 additions, 0 deletionstest/box/net.box_iproto_streams.result
- test/box/net.box_iproto_streams.test.lua 182 additions, 0 deletionstest/box/net.box_iproto_streams.test.lua
- test/box/net.box_long-poll_input_gh-3400.result 4 additions, 4 deletionstest/box/net.box_long-poll_input_gh-3400.result
- test/box/net.box_long-poll_input_gh-3400.test.lua 4 additions, 4 deletionstest/box/net.box_long-poll_input_gh-3400.test.lua
- test/box/suite.ini 1 addition, 1 deletiontest/box/suite.ini
Loading
Please register or sign in to comment