[PATCH 1/2] xlog: use ev_sleep instead of fiber_sleep for rate limiting
Konstantin Osipov
kostja at tarantool.org
Fri Jun 1 20:52:55 MSK 2018
* Vladimir Davydov <vdavydov.dev at gmail.com> [18/05/29 18:20]:
> fiber_sleep() works only if the current thread was created with
> cord_costart(). Since vinyl worker threads don't need fibers, they
> are created with cord_start() and hence can't use fiber_sleep().
> So to be able to limit rate of vinyl dump/compaction, we have to
> use ev_sleep() instead of fiber_sleep() in xlog. This is fine by
> other xlog writers, because they don't use fibers either, neither
> they should as xlogs are written without coio.
>
> Needed for #3220
Please use cord_costart() in vinyl workers instead.
We will end up needing it for other things and it's nearly free.
--
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