[Tarantool-patches] [PATCH 1/3] merger: drop luaL prefix where contract allows it

Alexander Turenko alexander.turenko at tarantool.org
Wed Jun 17 20:53:20 MSK 2020


> As for me I see a mess with the naming already exists:
> * What is the rule for using <lbox_> prefix? I see its common usage for
>   "exported" merger API functions (e.g. <lbox_merger_new_buffer_source>,
>   <lbox_merger_new_table_source>, <lbox_merger_new_tuple_source>) but
>   you also use it for <lbox_merge_source_new> helper routine. How come?

It should be luaT, agreed. But I finally decided to don't touch names
within this patchset.

> * There is a <luaT_check_merge_source> auxiliary function with no
>   Tarantool specifics underneath. Thereby it ought to be named with
>   <luaL_> prefix instead of <luaT_> one as you mentioned here[1]. Looks
>   like another naming rule "violation", doesn't it? However, you left
>   this one unchanged.

It operates on struct merge_source, so the naming here looks reasonable
for me.

> > I'll CC Igor to see what will look worthful for him.
> 
> I'm not fussy here (it's an old code) and we don't have strict naming
> policy for now, so let's discard these changes until we made any
> decision regarding #4577.

Considering Vlad's and your objections, it seems it is not worth to
touch these names.

I reverted the renames, but kept API comments and
luaL_merge_source_tuple_fetch() arguments reordering. I squashed those
changes into the main commit ('merger: fix NULL dereference when called
via iproto'). Added the following notes to the commit message:

 | Added API comments for destroy() and next() virtual methods to uniform
 | them visually with other merge source functions.
 |
 | Changed order of luaL_merge_source_tuple_fetch() arguments to unify it
 | with other functions (<struct lua_State *>, <struct merge_source *>).

WBR, Alexander Turenko.


More information about the Tarantool-patches mailing list