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

iproto: drop connections on iproto shutdown

This is the first patch in series of graceful Tarantool shutdown. We
already have graceful shutdown for client code (through
`box.ctl.on_shutdown()`) or network clients (through "box.shutdown" event).
This is graceful shutdown of server itself when we exit all threads
(instead of abrutly cancelling them) and thoroughly free all resources.

We need to introduce iproto_drop_connections for
tarantool/tarantool-ee#585 and this is part of graceful iproto shutdown
too. During client graceful iproto shutdown we stop accepting new
connections thus iproto_drop_connections on iproto shutdown will stop
all iproto activities.

On connection drop we stop IO for connection, cancel all inprogress
requests of the connection and wait while requests are finished and
connection is freed.

Relay requests are just long polling request of iproto. So on graceful
iproto shutdown the fiber processing relay request is cancelled. This
will cancel join or subscribe cords of relay because cord_cojoin cancels
cord threads.

Part of #8423

NO_TEST=rely on existing on tests
NO_CHANGELOG=internal
NO_DOC=internal
parent 3f1db5bf
No related branches found
No related tags found
Loading
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