[tarantool-patches] Re: [PATCH 4/9] gc: run garbage collection in background

Konstantin Osipov kostja at tarantool.org
Thu Nov 29 19:42:06 MSK 2018


* Vladimir Davydov <vdavydov.dev at gmail.com> [18/11/28 19:16]:
> Currently, garbage collection is executed synchronously by functions
> that may trigger it, such as gc_consumer_advance or gc_add_checkpoint.
> As a result, one has to be very cautious when using those functions as
> they may yield at their will. For example, we can't shoot off stale
> consumers right in tx_prio handler - we have to use rather clumsy WAL
> watcher interface instead. Besides, in future, when the garbage
> collector state is persisted, we will need to call those functions from
> on_commit trigger callback, where yielding is not normally allowed.
> 
> Actually, there's no reason to remove old files synchronously - we could
> as well do it in the background. So this patch introduces a background
> garbage collection fiber that executes gc_run when woken up. Now all
> functions that might trigger garbage collection wake up this fiber
> instead of executing gc_run directly.

OK to push.


-- 
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