[Tarantool-patches] [PATCH 2/5] lua/fio: Add lbox_fio_push_error as a separate helper

Cyrill Gorcunov gorcunov at gmail.com
Fri Nov 29 12:47:26 MSK 2019


On Fri, Nov 29, 2019 at 09:02:21AM +0300, Konstantin Osipov wrote:
> * Cyrill Gorcunov <gorcunov at gmail.com> [19/11/28 23:46]:
> > Since lbox_fio_pushbool always push boolean first
> > it is inpossible to use it inside other routines.
> > Thus make a separate helper lbox_fio_push_error
> > which will be used in popen code later.
> > 
> 
> OK, now I get why you simply use write() in popen API - you
> always wrap all calls to popen with a eio call. But why?

Because there could be calls with higher priority. coio
keeps requests in prio-heap (or similar) so we should
follow the scheme and every call to popen should be
dispatched in compare with other calls.

> 
> Isn't it sufficient to only wrap vfork, everything else 
> can be done in the main thread, what do you think?

You mean to call popen_helpers directly? From programming
pov I would love to make it so, the code base would shrink
a lot but I fear this won't be looking as a solid design.
Currently all our i/o goes via coio and scheduled. To be
honest I don't know yet which solution would be better.
Gimme some more time to investigate, I think we could
gather statistics once things settle down and remove
coio calls to popen if we decide. Thanks it is internal
stuff hidden from Lua users and they will not have to
change anything.

	Cyrill


More information about the Tarantool-patches mailing list