lua: change on_shutdown triggers behaviour
Previously lua on_shutdown triggers were started sequentially, now each of triggers starts in a separate fiber. Tarantool waits for 3.0 seconds to their completion by default. User has the option to change this value using new implemented box.ctl.set_on_shutdown_timeout function. If timeout has expired, tarantool immediately stops, without waiting for other triggers completion. Also moved ev_break from trigger to the on_shutdown_f function, after calling all on_shutdown lua triggers, because now all triggers are started asynchronously in fibers, and we should call ev_break only after all triggers are finished. Part of #5723 @TarantoolBot document Title: Changed Lua on_shutdown triggers behaviour. Previously lua on_shutdown triggers were started sequentially, now each of triggers starts in a separate fiber. Tarantool waits for 3.0 seconds to their completion by default. User has the option to change this value using new implemented box.ctl.set_on_shutdown_timeout function. If timeout has expired, tarantool immediately stops, without waiting for other triggers completion.
Showing
- changelogs/unreleased/change-lua-on-shutdown-triggers-behaviour.md 8 additions, 0 deletions...s/unreleased/change-lua-on-shutdown-triggers-behaviour.md
- src/box/box.cc 2 additions, 0 deletionssrc/box/box.cc
- src/box/box.h 3 additions, 0 deletionssrc/box/box.h
- src/box/lua/ctl.c 21 additions, 0 deletionssrc/box/lua/ctl.c
- src/main.cc 3 additions, 17 deletionssrc/main.cc
Loading
Please register or sign in to comment