From: Vladislav Shpilevoy via Tarantool-patches <tarantool-patches@dev.tarantool.org> To: Cyrill Gorcunov <gorcunov@gmail.com>, tml <tarantool-patches@dev.tarantool.org> Subject: Re: [Tarantool-patches] [PATCH v12 4/8] module_cache: direct update a cache value on reload Date: Sun, 24 Jan 2021 17:27:18 +0100 [thread overview] Message-ID: <9a2214b5-02e4-0c7f-dba4-7afaf51082f1@tarantool.org> (raw) In-Reply-To: <20210119124649.GA2185@grain> Thanks for the patch! On 19.01.2021 13:46, Cyrill Gorcunov wrote: > On Mon, Jan 18, 2021 at 11:35:52PM +0300, Cyrill Gorcunov wrote: >> Currently when we reload modules we remove old instance >> from the module cache and then try to insert a new one >> back. Note that module cache is a string based hash table: >> we lookup for a pointer to the module via package name. > > This approach doesn't work. Why? > --- > From: Cyrill Gorcunov <gorcunov@gmail.com> > Date: Tue, 12 Jan 2021 11:53:50 +0300 > Subject: [PATCH v12 4/8] module_cache: panic if module cache update failed > > Currently when we reload modules we remove old instance > from the module cache and then try to insert a new one > back. If error happens inbetween (say machine reached > lack of memory and hash resize failed) we try to restore > functions on old module. This is fine but we can't continue > working with modules -- next reload action won't find > the module in hash and won't reload. Since this is a really > rare case plain panic should be fine here. > > Part-of #4642 > > Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> > ---
next prev parent reply other threads:[~2021-01-24 16:28 UTC|newest] Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-01-18 20:35 [Tarantool-patches] [PATCH v12 0/8] box: implement cmod Lua module Cyrill Gorcunov via Tarantool-patches 2021-01-18 20:35 ` [Tarantool-patches] [PATCH v12 1/8] box/func: factor out c function entry structure Cyrill Gorcunov via Tarantool-patches 2021-01-18 20:35 ` [Tarantool-patches] [PATCH v12 2/8] module_cache: move module handling into own subsystem Cyrill Gorcunov via Tarantool-patches 2021-01-24 16:26 ` Vladislav Shpilevoy via Tarantool-patches 2021-01-25 8:52 ` Cyrill Gorcunov via Tarantool-patches 2021-01-18 20:35 ` [Tarantool-patches] [PATCH v12 3/8] module_cache: improve naming Cyrill Gorcunov via Tarantool-patches 2021-01-24 16:27 ` Vladislav Shpilevoy via Tarantool-patches 2021-01-24 22:32 ` Cyrill Gorcunov via Tarantool-patches 2021-01-30 18:53 ` Vladislav Shpilevoy via Tarantool-patches 2021-02-01 11:41 ` Cyrill Gorcunov via Tarantool-patches 2021-01-18 20:35 ` [Tarantool-patches] [PATCH v12 4/8] module_cache: direct update a cache value on reload Cyrill Gorcunov via Tarantool-patches 2021-01-19 12:46 ` Cyrill Gorcunov via Tarantool-patches 2021-01-24 16:27 ` Vladislav Shpilevoy via Tarantool-patches [this message] 2021-01-24 22:26 ` Cyrill Gorcunov via Tarantool-patches 2021-01-18 20:35 ` [Tarantool-patches] [PATCH v12 5/8] module_cache: rename calls to ref in module structure Cyrill Gorcunov via Tarantool-patches 2021-01-24 16:27 ` Vladislav Shpilevoy via Tarantool-patches 2021-01-25 10:29 ` Cyrill Gorcunov via Tarantool-patches 2021-01-18 20:35 ` [Tarantool-patches] [PATCH v12 6/8] module_cache: provide helpers to load and unload modules Cyrill Gorcunov via Tarantool-patches 2021-01-24 16:28 ` Vladislav Shpilevoy via Tarantool-patches 2021-01-18 20:35 ` [Tarantool-patches] [PATCH v12 7/8] box/cmod: implement cmod Lua module Cyrill Gorcunov via Tarantool-patches 2021-01-24 16:28 ` Vladislav Shpilevoy via Tarantool-patches 2021-01-25 16:50 ` Cyrill Gorcunov via Tarantool-patches 2021-01-30 18:53 ` Vladislav Shpilevoy via Tarantool-patches 2021-01-18 20:35 ` [Tarantool-patches] [PATCH v12 8/8] test: box/cfunc -- add cmod test Cyrill Gorcunov via Tarantool-patches 2021-01-24 16:28 ` Vladislav Shpilevoy via Tarantool-patches 2021-01-24 16:26 ` [Tarantool-patches] [PATCH v12 0/8] box: implement cmod Lua module Vladislav Shpilevoy via Tarantool-patches
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=9a2214b5-02e4-0c7f-dba4-7afaf51082f1@tarantool.org \ --to=tarantool-patches@dev.tarantool.org \ --cc=gorcunov@gmail.com \ --cc=v.shpilevoy@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH v12 4/8] module_cache: direct update a cache value on reload' \ /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