[tarantool-patches] Re: [PATCH] net.box: ignore absence of _vcollation

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Tue Jul 30 23:18:16 MSK 2019


Hi! Thanks for the patch!

> diff --git a/src/box/lua/net_box.lua b/src/box/lua/net_box.lua
> index 2892bb3d3..31a8c16b7 100644
> --- a/src/box/lua/net_box.lua
> +++ b/src/box/lua/net_box.lua
> @@ -754,6 +768,8 @@ local function create_transport(host, port, user, password, callback,
>              if err then return error_sm(err, hdr) end
>              dispatch_response_iproto(hdr, body_rpos, body_end)
>              local id = hdr[IPROTO_SYNC_KEY]
> +            -- trick: omit check for peer_has_vcollation: id is
> +            -- not nil

Nit: usually we start comments with a capital letter and finish
with a dot. Here and in other hunks. Other than that the patch
LGTM.

>              if id == select1_id or id == select2_id or id == select3_id then
>                  -- response to a schema query we've submitted
>                  local status = hdr[IPROTO_STATUS_KEY]
> diff --git a/test/box/net.box.result b/test/box/net.box.result
> index 1d9f43400..e3dabf7d9 100644
> --- a/test/box/net.box.result
> +++ b/test/box/net.box.result
> @@ -2905,18 +2905,41 @@ c = net:connect(box.cfg.listen)
> +#parts == 1
> +---
> +- true
> +...
> +parts[1].fieldno == 1
> +---
> +- true
> +...
> +parts[1].type == 'string'
> +---
> +- true
> +...
> +parts[1].is_nullable == false
> +---
> +- true
> +...
> +if _TARANTOOL >= '2.2.1' then                    \
> +    return parts[1].collation == 'test'          \
> +else                                             \
> +    return parts[1].collation_id == collation_id \

I like this new test-run feature with '\', looks way better
than setopt delimited, and looks like C.




More information about the Tarantool-patches mailing list