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

Konstantin Osipov kostja.osipov at gmail.com
Fri Dec 13 10:58:50 MSK 2019


* Vladislav Shpilevoy <v.shpilevoy at tarantool.org> [19/12/13 09:42]:
> > Can you move it to Lua fiber object and iproto_msg object?
> 
> I am not sure I understand what you mean. I can't move lua fiber
> storage destructor to iproto. I need Lua for that. So this should
> be in Lua folder.

I mean struct rlist on_request_end should be a member of
iproto_msg, not struct fiber. Does it make sense?

> If you are talking about moving trigger list to iproto and Lua,
> and somehow saying pointer at that list to a member in struct
> fiber, then

No, why do you need to store the list in struct fiber?

>   1) I would need to patch C version too, because we have public
>      C API. The fact you forgot about C API says, that it is not
>      a good idea to make that cleanup in each front end. Easy to
>      miss something;

C api will enter into Lua land (lbox_pushfiber) as soon as it
creates a Lua fiber, and the Lua land will call the trigger in 
the end of lbox_fiber_run_f.

>   2) That will give exactly the same - a member in struct fiber.
>      There just no other communication channel between different
>      frontends in which a fiber may participate during lifetime;

Why do you think there will be different frontends involved? The
storage is pure-Lua, there is no fiber storage for non-Lua fibers.

>   3) We would need to add a new member to struct fiber and
>      increase its size.

Please see above, do you get the idea now?


-- 
Konstantin Osipov, Moscow, Russia


More information about the Tarantool-patches mailing list