Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH v3 00/16] module api: extend for external key_def Lua module
@ 2020-10-12 23:23 Alexander Turenko
  2020-10-12 23:23 ` [Tarantool-patches] [PATCH v3 01/16] module api: get rid of typedef redefinitions Alexander Turenko
                   ` (18 more replies)
  0 siblings, 19 replies; 33+ messages in thread
From: Alexander Turenko @ 2020-10-12 23:23 UTC (permalink / raw)
  To: Vladislav Shpilevoy; +Cc: tarantool-patches, Alexander Turenko

Vlad,

Thank you for the past thorough reviews and answering to a lot of my
questions!

Can you look over the updated patchset once again?

Overview
--------

The patchset exposes and adds new functions into the module API, which
are necessary to implement the external tuple.keydef module. Aside of
this, a couple of relevant bugs were fixed.

The extra commits for tarantool-1.10 are the following:

 - lua: adjust contract of luaT_tuple_new()
 - collation: allow to find a collation by a name

I'll not flood the mailing list with the 1.10 version of the patchset
(if someone will not ask me do to that). It mostly the same or similar
as this patchset (however there are some code differences).

Previous versions:

[v1]: https://lists.tarantool.org/pipermail/tarantool-patches/2020-September/019583.html
[v2]: https://lists.tarantool.org/pipermail/tarantool-patches/2020-October/020019.html

Changelog from v2 to v3
-----------------------

In brief: the last three commits from v2 gains test cases, the new
function box_key_def_validate_full_key() is added.

- Clarified how default values of <box_key_part_def_t> may be changed in a
  future tarantool versions.
- Added a test case for 'none' collation for box_key_def_dump_parts().
- Added -g to build module API test to obtain backtraces from GDB.
- Added box_key_def_merge() test.
- Added basic box_key_def_extract_key() test.
- Added basic box_key_def_validate_key() test.
- Clarified box_key_def_validate_key() API comment.
- Fixed some typos, made suggested style changes.
- Added region_truncate() in case of encoding or OOM error inside
  luaT_tuple_encode().
- Added box_key_def_validate_full_key().
- Clafiried the Lua stack manipulations in luaT_tuple_encode_on_lua_ibuf().

@ChangeLog

- Module API: Get rid of typedef redefinitions for compatibility with
  C99 (gh-5313).
- Lua: Fixed unhandled Lua error that may lead to memory leaks and
  inconsistencies in `<space_object>:frommap()`,
  `<key_def_object>:compare()`, `<merge_source>:select()` (gh-5382).
- Module API: Exposed the box region, key_def and several other
  functions in order to implement an external tuple.keydef module on top
  of them (gh-5273).

Issues
------

https://github.com/tarantool/tarantool/issues/5313 ('module api: module
API requires C11')
https://github.com/tarantool/tarantool/issues/5382 ('luaT_tuple_new()
raises a Lua error that leads to various problems')
https://github.com/tarantool/tarantool/issues/5273 ('module api: expose
everything that is needed for external key_def module')

Branches
--------

https://github.com/tarantool/tarantool/tree/Totktonada/gh-5273-expand-module-api
(top 16 commits)
https://github.com/tarantool/tarantool/tree/Totktonada/gh-5273-expand-module-api-1.10
(top 18 commits)

The module based on this API
----------------------------

https://github.com/Totktonada/key_def

The module repository will be moved to the tarantool organization soon,
when the module API will come into the server. It'll be in
https://github.com/tarantool/tuple-keydef

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()

 src/CMakeLists.txt               |    2 +-
 src/box/index.h                  |    5 +-
 src/box/key_def.c                |  264 +++++
 src/box/key_def.h                |  268 ++++-
 src/box/lua/tuple.c              |  210 +++-
 src/box/lua/tuple.h              |   46 +-
 src/exports.h                    |   15 +
 src/lib/core/fiber.c             |   24 +
 src/lib/core/fiber.h             |   76 ++
 src/lua/utils.c                  |    6 +
 src/lua/utils.h                  |   20 +
 test/app-tap/CMakeLists.txt      |    6 +
 test/app-tap/module_api.c        | 1711 ++++++++++++++++++++++++++++++
 test/app-tap/module_api.test.lua |   63 +-
 test/unit/luaT_tuple_new.c       |   42 +-
 test/unit/luaT_tuple_new.result  |    6 +-
 16 files changed, 2705 insertions(+), 59 deletions(-)

-- 
2.25.0

^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2020-10-16  6:05 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-12 23:23 [Tarantool-patches] [PATCH v3 00/16] module api: extend for external key_def Lua module Alexander Turenko
2020-10-12 23:23 ` [Tarantool-patches] [PATCH v3 01/16] module api: get rid of typedef redefinitions Alexander Turenko
2020-10-12 23:23 ` [Tarantool-patches] [PATCH v3 02/16] module api: expose box region Alexander Turenko
2020-10-14 23:41   ` Vladislav Shpilevoy
2020-10-15 13:17     ` Alexander Turenko
2020-10-12 23:23 ` [Tarantool-patches] [PATCH v3 03/16] module api/lua: add luaL_iscdata() function Alexander Turenko
2020-10-12 23:23 ` [Tarantool-patches] [PATCH v3 04/16] lua: factor out tuple encoding from luaT_tuple_new Alexander Turenko
2020-10-12 23:23 ` [Tarantool-patches] [PATCH v3 05/16] lua: don't raise a Lua error from luaT_tuple_new() Alexander Turenko
2020-10-14 23:41   ` Vladislav Shpilevoy
2020-10-15 13:17     ` Alexander Turenko
2020-10-12 23:23 ` [Tarantool-patches] [PATCH v3 06/16] module api/lua: add luaT_tuple_encode() Alexander Turenko
2020-10-12 23:23 ` [Tarantool-patches] [PATCH v3 07/16] module api/lua: expose luaT_tuple_new() Alexander Turenko
2020-10-12 23:23 ` [Tarantool-patches] [PATCH v3 08/16] module api/lua: add API_EXPORT to tuple functions Alexander Turenko
2020-10-14 23:41   ` Vladislav Shpilevoy
2020-10-15  2:35     ` Alexander Turenko
2020-10-12 23:23 ` [Tarantool-patches] [PATCH v3 09/16] module api: add API_EXPORT to key_def functions Alexander Turenko
2020-10-12 23:23 ` [Tarantool-patches] [PATCH v3 10/16] module api: add box_key_def_new_v2() Alexander Turenko
2020-10-12 23:23 ` [Tarantool-patches] [PATCH v3 11/16] module api: add box_key_def_dump_parts() Alexander Turenko
2020-10-12 23:23 ` [Tarantool-patches] [PATCH v3 12/16] module api: expose box_key_def_validate_tuple() Alexander Turenko
2020-10-12 23:23 ` [Tarantool-patches] [PATCH v3 13/16] module api: expose box_key_def_merge() Alexander Turenko
2020-10-14 23:41   ` Vladislav Shpilevoy
2020-10-12 23:23 ` [Tarantool-patches] [PATCH v3 14/16] module api: expose box_key_def_extract_key() Alexander Turenko
2020-10-14 23:41   ` Vladislav Shpilevoy
2020-10-15  2:39     ` Alexander Turenko
2020-10-12 23:23 ` [Tarantool-patches] [PATCH v3 15/16] module api: add box_key_def_validate_key() Alexander Turenko
2020-10-14 23:41   ` Vladislav Shpilevoy
2020-10-15 13:18     ` Alexander Turenko
2020-10-12 23:23 ` [Tarantool-patches] [PATCH v3 16/16] module api: add box_key_def_validate_full_key() Alexander Turenko
2020-10-14 23:41 ` [Tarantool-patches] [PATCH v3 00/16] module api: extend for external key_def Lua module Vladislav Shpilevoy
2020-10-15  3:09   ` Alexander Turenko
2020-10-15 13:19 ` Alexander Turenko
2020-10-16  6:05   ` Alexander Turenko
2020-10-15 20:12 ` Vladislav Shpilevoy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox