Closed Gerold103 closed 2 years ago
LGTM However it breaks all version checks introduced previously. There is a "gap" between commits where msgpack object was introduced and is_array method was implemented. But I believe that there should be nothing serious.
I meant that to be consistent both of this conditions should be replaced with msgpack.object ~= nil and msgpack.object({}).take_array ~= nil
.
https://github.com/tarantool/vshard/blob/cd321dd4b97952c35cad698c474a41eea5bbc35c/vshard/util.lua#L238-L240
In the commit message I added specifically that distinguishing these cases wouldn't make much sense. Neither msgpack object, nor its iterator, nor take_array
method are released.
The patchset makes the router use
take_array()
method of msgpack iterator instead of manual tail cut via an intermediate Lua table.