[Tarantool-patches] [PATCH v3 00/16] module api: extend for external key_def Lua module

Alexander Turenko alexander.turenko at tarantool.org
Thu Oct 15 06:09:00 MSK 2020


On Thu, Oct 15, 2020 at 01:41:57AM +0200, Vladislav Shpilevoy wrote:
> Hi! Thanks for the patchset!
> 
> Are we going to create a docbot request or a documentation ticket
> for all these newly exported functions?

I will create the issue manually.

> 
> > Alexander Turenko (16):
> >   module api: get rid of typedef redefinitions
> >   module api: expose box region
> >   module api/lua: add luaL_iscdata() function
> >   lua: factor out tuple encoding from luaT_tuple_new
> >   lua: don't raise a Lua error from luaT_tuple_new()
> >   module api/lua: add luaT_tuple_encode()
> >   module api/lua: expose luaT_tuple_new()
> >   module api/lua: add API_EXPORT to tuple functions
> >   module api: add API_EXPORT to key_def functions
> >   module api: add box_key_def_new_v2()
> >   module api: add box_key_def_dump_parts()
> >   module api: expose box_key_def_validate_tuple()
> >   module api: expose box_key_def_merge()
> >   module api: expose box_key_def_extract_key()
> >   module api: add box_key_def_validate_key()
> >   module api: add box_key_def_validate_full_key()
> 
> Still don't understand why do we need full key validation.
> Anyway it won't help in anything. The only purpose I can
> think of is kind of a guarantee, that if a key is full and
> valid, it will return at most 1 tuple, but it is not so for
> non-unique indexes - for them a full and not full keys are
> the same. But whatever.

But what if a caller knows that a particular key_def corresponds to some
unique index and want to ensure that a key is not only valid, but also
full? Or it knows that a particular key_def imposes a strict order on a
particular tuple stream and want to ensure that compare against given
key will impose the same strict ordering? It may be important for
pagination.


More information about the Tarantool-patches mailing list