Tarantool development patches archive
 help / color / mirror / Atom feed
From: Timur Safin <tsafin@tarantool.org>
To: v.shpilevoy@tarantool.org, alexander.turenko@tarantool.org
Cc: tarantool-patches@dev.tarantool.org
Subject: [Tarantool-patches] [PATCH 2.X v3 0/3] module api: extend for external merger Lua module
Date: Mon, 12 Oct 2020 03:44:08 +0300	[thread overview]
Message-ID: <cover.1602463103.git.tsafin@tarantool.org> (raw)

This patchset is a continuation of patch series which Alexander Turenko sends
elsewhere. It extends module api with the necessary wrappers we should have 
in api to make external merger possible. Some internal functionality which
was acessible to internal merger, should be wrapped via accessors if merger
is becoming external.

- most of introduced functions are simple public wrappers around of internal 
  functions, e.g. `box_tuple_validate` is a wrapper around 
  `tuple_validate_raw`, or `bax_key_def_dup` is a wrapper for `key_def_dup`.
  They were necessary to not reveal implementation specific details 
  (i.e. `tuple_data` needed in `tuple_validate_raw` should know `box_tuple_t`
  layout);
- wherever we used to use `struct tuple *` we replacing them with public alias
  `box_tuple_t`. Same is for `struct tuple_format` -> `box_tuple_format_t` and 
  other typedefs.

Changelog of v2 to v1
---------------------
Please do not be surprised to not seen v2 in your inbox - it was cancelled 
after discussion with Alexander Turenko (see v2.1 below with descriptions)

- Unpublished again `lauT_temp_state`, `luaT_release_temp_state` - they are
  performance wrappers around creation of Lua thread states. Agreed that 
  performance impact not that big, thus created similar compatibility wrappers
  on the module side;
- unpublished `luaT_newthread`, because for module usage `lua_newthread` is 
  enough;
- unpublished `luaL_register_module` & `luaL_register_type` and reworked module
  code with `luaL_register`.

Smallish changelog of v2.1 to v2
--------------------------------
Alexander Turenko has provided valuable feedback to the v2 branch I've shown,
so we have yet more reduced this patchset
- Unpublished `luaL_cdata_iscallable`, it's unnecessary for external module
  which is using now public `luaL_iscallable` module api call, instead 
  of compatibility layer in module;
- Unpublished `luaL_checkconstchar` because it's not yet needed anywhere
  externally;
- Accordingly to thsoe changes above we have reduced code in module_api
  test files.

Changelog for v3
----------------
- Reshuffled patchset to merge tests with their corresponding code;

I'm sending this version because it's too late already and I need to sleep...

Plans for v3.1
--------------
- Add ibuf wrapper, despite all controversies
  it's coming soon...


Issue:
* https://github.com/tarantool/tarantool/issues/5384
  ('module api: expose everything that is needed for external merger module')

Branches:
* https://github.com/tarantool/tarantool/tree/tsafin/gh-5273-expand-module-api-v3
  (top 3 commits above of a bunch of @Totktonada's commits)
* 1.10 branch will be sent momentarily as a followup. Stay tuned

== External merger module

Currently external merger is residing here https://github.com/tsafin/tarantool-merge
and it uses key_def from https://github.com/Totktonada/key_def repository
via simple luarocks dependency (we had to introduce debugging rock-server to
make this working).

CI is installed and is running on GitHub Actions, thus we know that it's 
sort of working together (UPD: used to work before key_def api reshuffled recently),
but more extensive testing of merger and key_def yet to be proceeded.



Timur Safin (3):
  module api: export box_tuple_validate
  module api: export box_key_def_dup
  module api: luaL_checkibuf

 src/box/key_def.c                |  6 +++++
 src/box/key_def.h                | 10 +++++++
 src/box/tuple.c                  |  6 +++++
 src/box/tuple.h                  | 11 ++++++++
 src/exports.h                    |  3 +++
 src/lua/utils.h                  | 16 ++++++------
 test/app-tap/module_api.c        | 26 ++++++++++++++++++
 test/app-tap/module_api.test.lua | 45 +++++++++++++++++++++++++++++++-
 8 files changed, 114 insertions(+), 9 deletions(-)

-- 
2.20.1

             reply	other threads:[~2020-10-12  0:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-12  0:44 Timur Safin [this message]
2020-10-12  0:44 ` [Tarantool-patches] [PATCH 2.X v3 1/3] module api: export box_tuple_validate Timur Safin
2020-10-13  0:14   ` Alexander Turenko
2020-10-13  0:35     ` Timur Safin
2020-10-12  0:44 ` [Tarantool-patches] [PATCH 2.X v3 2/3] module api: export box_key_def_dup Timur Safin
2020-10-13  0:46   ` Alexander Turenko
2020-10-12  0:44 ` [Tarantool-patches] [PATCH 2.X v3 3/3] module api: luaL_checkibuf Timur Safin
2020-10-13 11:47   ` Alexander Turenko
2020-10-13 19:26     ` Igor Munkin
2020-10-13 16:30 ` [Tarantool-patches] [PATCH 2.X v3] module api: box_ibuf_* wrappers Timur Safin
2020-10-13 18:21   ` Alexander Turenko
2020-10-13 19:02     ` Timur Safin
2020-10-13 19:58       ` Alexander Turenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1602463103.git.tsafin@tarantool.org \
    --to=tsafin@tarantool.org \
    --cc=alexander.turenko@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH 2.X v3 0/3] module api: extend for external merger Lua module' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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