[PATCH 0/3] Force stop of vinyl worker threads on shutdown

Konstantin Osipov kostja at tarantool.org
Thu Mar 1 23:07:12 MSK 2018


* Vladimir Davydov <vdavydov.dev at gmail.com> [18/03/01 13:58]:
> If the user terminates tarantool while compaction is in progress,
> tarantool won't exit immediately - it will hang until all dump and
> compaction tasks that are currently in progress are complete, which
> may take quite a while on large data sets. What is especially funny,
> once a task has been finished, vinyl will not commit the produced run
> file in the vylog, because the event loop has already been stopped,
> and so will delete it after restart and schedule the task anew.
> 
> This patch set makes the scheduler forcefully abort all running tasks
> as soon as possible. Patch 1 introduces vy_run_writer helper so that
> we can check the scheduler state while writing a run file. Patch 2
> replaces cord_costart() with cord_start() for worker threads, because
> they don't use coio. Patch 3 adds a check to the run writing procedure
> that makes it abort if the scheduler is stopping.
> 
> https://github.com/tarantool/tarantool/issues/3166
> https://github.com/tarantool/tarantool/tree/gh-3166-vy-abort-all-tasks-on-exit

I pushed this patch set, thanks.

-- 
Konstantin Osipov, Moscow, Russia, +7 903 626 22 32
http://tarantool.org - www.twitter.com/kostja_osipov



More information about the Tarantool-patches mailing list