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

Alexander Turenko alexander.turenko at tarantool.org
Sat Jul 20 22:07:15 MSK 2019


> > diff --git a/src/box/lua/net_box.lua b/src/box/lua/net_box.lua
> > index 2892bb3d3..723e63045 100644
> > --- a/src/box/lua/net_box.lua
> > +++ b/src/box/lua/net_box.lua
> > @@ -761,6 +761,11 @@ local function create_transport(host, port, user, password, callback,
> >                  if status ~= 0 then
> >                      local body
> >                      body, body_end = decode(body_rpos)
> > +                    local err_msg = 'Space \'277\' does not exist'
> 
> Space 277? Seriously? This code handles not only collations request.
> Should be more generic, IMHO.

Of course, it is better to use VCOLLATION_ID constant that already
defined above.

Kirill, I didn't got your comment. This error message is only about one
specific case: there is no such space. I think this approach is better
then version check (that is proposed in the next version of the patch),
because of readability: the version check approach leads to many small
if's, while here we add only one check.

BTW, Kostja also has a comment:
https://github.com/tarantool/tarantool/commit/47227cfa4c9bac76a882464a2d0440e5137f158e#commitcomment-34342515

WBR, Alexander Turenko.




More information about the Tarantool-patches mailing list