[Tarantool-patches] [PATCH 2/2] fiber: destroy fiber.storage created by iproto

Konstantin Osipov kostja.osipov at gmail.com
Sat Dec 14 15:30:56 MSK 2019


* Konstantin Osipov <kostja.osipov at gmail.com> [19/12/14 15:26]:
> request storage is specific to Lua which doesn't have Go-style deferrables,
> Python-style finally() or any other working means for controlled
> garbage collection.
> 
> Even in Lua it is better done as a third party library, which works
> the same way as box.atomic(): wraps the request body with 
> a RAII-style function.
> 
> This feature *is* broken & redundant, and instead of making the
> damage controlled, you want to "fix" it by making the feature
> universal and implementing it on C level.

I checked now, and Lua addeded debug.getupvalue() to Lua C API.

On other words, fiber storage now can be implemented in pure Lua,
without any triggers. 

Back when we were writing, upvalue API was only available in C
API, and AFAIR there was no way to access upvalues from Lua, this
is why we had to come up with this hack.

-- 
Konstantin Osipov, Moscow, Russia


More information about the Tarantool-patches mailing list