Skip to content
Snippets Groups Projects
Commit 557567ee authored by Nikolay Shirokovskiy's avatar Nikolay Shirokovskiy Committed by Vladimir Davydov
Browse files

gc: add graceful shutdown

We call `gc_shutdown` after all client shutdown fibers is finished. So
shutdown is quite simple, we just need to finish checkpoint system
fibers.

There may be a checkpoint in progress during shutdown. It can by done in
`checkpoint_daemon` fiber or in client fiber. Anyway we just need to
make sure it is cancellable. In case of memtx we run checkpoint in
distinct cord but thanks to `cord_cojoin` semantics cancel is propagated
to the cord's main fiber. So let's add a yield to the `checkpoint_f` to
make it cancellable.

Now we don't need `checkpoint_cancel` at all. At the moment of
memtx_engine_shutdown (actually freeing resources) the cord is sure to
be terminated.

Part of #8423

NO_CHANGELOG=internal
NO_DOC=internal
parent 41db4512
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment