From: Vladislav Shpilevoy via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Cyrill Gorcunov <gorcunov@gmail.com>,
tml <tarantool-patches@dev.tarantool.org>
Cc: Mons Anderson <v.perepelitsa@corp.mail.ru>
Subject: Re: [Tarantool-patches] [PATCH v15 00/11] box: implement cmod Lua module
Date: Sat, 6 Feb 2021 18:55:11 +0100 [thread overview]
Message-ID: <1a9a104a-89eb-2acd-3ed0-f65f59d80084@tarantool.org> (raw)
In-Reply-To: <20210205185436.638894-1-gorcunov@gmail.com>
Hi! Thanks for the patchset!
> v15:
> - report module state cached/orphan
> - update test cases
> - do not prevent functions lookup in orphan modules
> - there was an idea to use box.shema.func cache as on
> top of cmod's one, but this doesn't work because in case
> if module doesnt exist in any caches we would put it into
> into cmod's one as well but there wont be a module on
> cmod level which would clean it up later (which makes
> code a way more comple if we choose to track state
> of modules).
It wouldn't be related to cmod. Did you really try? The cache
would work on the level of module_cache. And entries there would
be reference counted. If a module is used only by box.schema.func,
it has ref counter 1. If it not used anymore, it gets counter 0
and is deleted. If it also used by cmod, its counter is not 0, and
it is not deleted. What is the problem?
> branch gorcunov/gh-4642-func-ro-15
> issue https://github.com/tarantool/tarantool/issues/4642
>
> Cyrill Gorcunov (11):
> box/func: factor out c function entry structure
> module_cache: move module handling into own subsystem
> module_cache: direct update a cache value on reload
> module_cache: rename calls to ref in module structure
> module_cache: add comment about weird resolving
> module_cache: module_reload - drop redundant parameter
> module_cache: use references as a main usage counter
> module_cache: make module to carry hash it belongs to
> module_cache: use own hash for box.schema.func requests
> box/cmod: implement cmod Lua module
> test: box/cfunc -- add cmod test
>
> src/box/CMakeLists.txt | 2 +
> src/box/call.c | 10 +-
> src/box/func.c | 491 +-------------------------
> src/box/func.h | 41 +--
> src/box/func_def.h | 14 -
> src/box/lua/cmod.c | 610 ++++++++++++++++++++++++++++++++
> src/box/lua/cmod.h | 24 ++
> src/box/lua/init.c | 2 +
> src/box/module_cache.c | 756 ++++++++++++++++++++++++++++++++++++++++
> src/box/module_cache.h | 178 ++++++++++
> test/box/CMakeLists.txt | 2 +
> test/box/cfunc1.c | 58 +++
> test/box/cfunc2.c | 137 ++++++++
> test/box/cmod.result | 336 ++++++++++++++++++
> test/box/cmod.test.lua | 130 +++++++
> test/box/suite.ini | 2 +-
> 16 files changed, 2248 insertions(+), 545 deletions(-)
> create mode 100644 src/box/lua/cmod.c
> create mode 100644 src/box/lua/cmod.h
> create mode 100644 src/box/module_cache.c
> create mode 100644 src/box/module_cache.h
> create mode 100644 test/box/cfunc1.c
> create mode 100644 test/box/cfunc2.c
> create mode 100644 test/box/cmod.result
> create mode 100644 test/box/cmod.test.lua
>
>
> base-commit: 7722a81c6a5a3c57c27a688c957fb187d81850f0
>
prev parent reply other threads:[~2021-02-07 18:13 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-05 18:54 Cyrill Gorcunov via Tarantool-patches
2021-02-05 18:54 ` [Tarantool-patches] [PATCH v15 01/11] box/func: factor out c function entry structure Cyrill Gorcunov via Tarantool-patches
2021-02-05 18:54 ` [Tarantool-patches] [PATCH v15 02/11] module_cache: move module handling into own subsystem Cyrill Gorcunov via Tarantool-patches
2021-02-07 17:20 ` Vladislav Shpilevoy via Tarantool-patches
2021-02-05 18:54 ` [Tarantool-patches] [PATCH v15 03/11] module_cache: direct update a cache value on reload Cyrill Gorcunov via Tarantool-patches
2021-02-05 18:54 ` [Tarantool-patches] [PATCH v15 04/11] module_cache: rename calls to ref in module structure Cyrill Gorcunov via Tarantool-patches
2021-02-05 18:54 ` [Tarantool-patches] [PATCH v15 05/11] module_cache: add comment about weird resolving Cyrill Gorcunov via Tarantool-patches
2021-02-05 18:54 ` [Tarantool-patches] [PATCH v15 06/11] module_cache: module_reload - drop redundant parameter Cyrill Gorcunov via Tarantool-patches
2021-02-05 18:54 ` [Tarantool-patches] [PATCH v15 07/11] module_cache: use references as a main usage counter Cyrill Gorcunov via Tarantool-patches
2021-02-07 17:20 ` Vladislav Shpilevoy via Tarantool-patches
2021-02-08 11:54 ` Cyrill Gorcunov via Tarantool-patches
2021-02-05 18:54 ` [Tarantool-patches] [PATCH v15 08/11] module_cache: make module to carry hash it belongs to Cyrill Gorcunov via Tarantool-patches
2021-02-07 17:20 ` Vladislav Shpilevoy via Tarantool-patches
2021-02-05 18:54 ` [Tarantool-patches] [PATCH v15 09/11] module_cache: use own hash for box.schema.func requests Cyrill Gorcunov via Tarantool-patches
2021-02-07 17:20 ` Vladislav Shpilevoy via Tarantool-patches
2021-02-05 18:54 ` [Tarantool-patches] [PATCH v15 10/11] box/cmod: implement cmod Lua module Cyrill Gorcunov via Tarantool-patches
2021-02-07 17:20 ` Vladislav Shpilevoy via Tarantool-patches
2021-02-05 18:54 ` [Tarantool-patches] [PATCH v15 11/11] test: box/cfunc -- add cmod test Cyrill Gorcunov via Tarantool-patches
2021-02-07 17:20 ` Vladislav Shpilevoy via Tarantool-patches
2021-02-07 17:21 ` Vladislav Shpilevoy via Tarantool-patches
2021-02-06 17:55 ` Vladislav Shpilevoy via Tarantool-patches [this message]
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=1a9a104a-89eb-2acd-3ed0-f65f59d80084@tarantool.org \
--to=tarantool-patches@dev.tarantool.org \
--cc=gorcunov@gmail.com \
--cc=v.perepelitsa@corp.mail.ru \
--cc=v.shpilevoy@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH v15 00/11] box: implement cmod 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