[PATCH 1/2] xlog: use ev_sleep instead of fiber_sleep for rate limiting
Konstantin Osipov
kostja at tarantool.org
Thu Jun 7 16:11:52 MSK 2018
* Vladimir Davydov <vdavydov.dev at gmail.com> [18/06/04 23:48]:
> Anyway, yielding in xlog_write() may be unexpected from caller's pov,
> because this function is blocking (writes a file) and isn't supposed
> to yield. One usually hands it over to coio or a worker thread, where
> yielding is pointless.
>
> >
> > We will end up needing it for other things and it's nearly free.
>
> What things?
Multiple things going on in the writer thread. Fiber-based
programming is a powerful concept, and we're already using cbus
for writer threads. Any kind of monitoring, collecting statistics,
periodic work is easier done when you have fiber runtime
available.
--
Konstantin Osipov, Moscow, Russia, +7 903 626 22 32
http://tarantool.io - www.twitter.com/kostja_osipov
More information about the Tarantool-patches
mailing list