[Tarantool-patches] [PATCH v12 4/8] module_cache: direct update a cache value on reload

Cyrill Gorcunov gorcunov at gmail.com
Mon Jan 25 01:26:31 MSK 2021

On Sun, Jan 24, 2021 at 05:27:18PM +0100, Vladislav Shpilevoy wrote:
> 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?

False alarm, it does work. I fear due to shadow copy it won't
be consistent but looking more precisely to mhash code I think
it should be safe to update the pointer inplace without modifying
the hash table. I still think our hashing code is just unreadable
pile but whatever...

More information about the Tarantool-patches mailing list