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

Vladimir Davydov vdavydov.dev at gmail.com
Thu Nov 29 20:43:06 MSK 2018


On Thu, Nov 29, 2018 at 07:42:06PM +0300, Konstantin Osipov wrote:
> * 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.

Pushed to 2.1.



More information about the Tarantool-patches mailing list