net.box: remove varargs from call() and eval()
Change conn:call() and conn:eval() API to accept Lua table instead of varargs for function/expression arguments: conn:call(func_name, arg1, arg2, ...) => conn:call(func_name, {arg1, arg2, ...}, opts) conn:eval(expr, arg1, arg2, ...) => conn:eval(expr, {arg1, arg2, ...}, opts) This breaking change is needed to extend call() and eval() API with per-requests options, like `timeout` and `buffer` (see #2195): c:call("echo", {1, 2, 3}, {timeout = 0.2}) c:call("echo", {1, 2, 3}, {buffer = ibuf}) ibuf.rpos, result = msgpack.ibuf_decode(ibuf.rpos) result Tarantool 1.6.x behaviour can be turned on by `call_16` per-connection option: c = net.connect(box.cfg.listen, {call_16 = true}) c:call('echo', 1, 2, 3) This is a breaking change for 1.7.x. Needed for #2285 Closes #2195
Showing
- src/box/lua/net_box.lua 51 additions, 15 deletionssrc/box/lua/net_box.lua
- test/box/access_bin.result 3 additions, 3 deletionstest/box/access_bin.result
- test/box/access_bin.test.lua 3 additions, 3 deletionstest/box/access_bin.test.lua
- test/box/function1.result 5 additions, 5 deletionstest/box/function1.result
- test/box/function1.test.lua 5 additions, 5 deletionstest/box/function1.test.lua
- test/box/net.box.result 125 additions, 18 deletionstest/box/net.box.result
- test/box/net.box.test.lua 55 additions, 18 deletionstest/box/net.box.test.lua
- test/replication/hot_standby.result 2 additions, 2 deletionstest/replication/hot_standby.result
- test/replication/hot_standby.test.lua 2 additions, 2 deletionstest/replication/hot_standby.test.lua
Loading
Please register or sign in to comment