You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A new IPROTO request type was introduced - IPROTO_SHUTDOWN, code 77.
When asked to shut down (os.exit() is called or SIGTERM signal is
received), a server stops accepting new connections and sends a packet
of this type to each of its clients that support the graceful shutdown
feature (see below how a server figures out if a client supports the
feature). The server won't exit until all the clients that were sent the
packets close connections. If all the clients don't close connections
within the shutdown timeout, the server will exit anyway. The default
shutdown timeout is 3 seconds, and it can be configured with box.ctl.set_on_shutdown_timeout(), which also determines the timeout
of box.ctl.on_shutdown() triggers.
An IPROTO_SHUTDOWN packet doesn't have any keys in its headers (not
even sync number or schema version) nor a body. A client isn't supposed
to reply to an IPROTO_SHUTDOWN packet. Instead it's supposed to close
its connection as soon as possible. A client may wait for pending
requests to complete and even send new requests after receiving an IPROTO_SHUTDOWN packet. The server will serve them as usual until it
exits on timeout.
Clients that support the graceful shutdown feature are supposed to set
the IPROTO_FEATURE_GRACEFUL_SHUTDOWN feature (bit 4) when sending an IPROTO_ID request to a server. Servers that support the feature set
the same bit in reply to an IPROTO_ID request. Introduction of this
feature bumped the IPROTO protocol version up to 4.
Requested by @locker in tarantool/tarantool@6f29f9d.
The text was updated successfully, but these errors were encountered:
Hold on! We are currently thinking about reworking the feature implementation, see tarantool/tarantool#6813. I'll update the ticket once we agree how to proceed.
A new IPROTO request type was introduced -
IPROTO_SHUTDOWN
, code 77.When asked to shut down (
os.exit()
is called orSIGTERM
signal isreceived), a server stops accepting new connections and sends a packet
of this type to each of its clients that support the graceful shutdown
feature (see below how a server figures out if a client supports the
feature). The server won't exit until all the clients that were sent the
packets close connections. If all the clients don't close connections
within the shutdown timeout, the server will exit anyway. The default
shutdown timeout is 3 seconds, and it can be configured with
box.ctl.set_on_shutdown_timeout()
, which also determines the timeoutof
box.ctl.on_shutdown()
triggers.An
IPROTO_SHUTDOWN
packet doesn't have any keys in its headers (noteven sync number or schema version) nor a body. A client isn't supposed
to reply to an
IPROTO_SHUTDOWN
packet. Instead it's supposed to closeits connection as soon as possible. A client may wait for pending
requests to complete and even send new requests after receiving an
IPROTO_SHUTDOWN
packet. The server will serve them as usual until itexits on timeout.
Clients that support the graceful shutdown feature are supposed to set
the
IPROTO_FEATURE_GRACEFUL_SHUTDOWN
feature (bit 4) when sending anIPROTO_ID
request to a server. Servers that support the feature setthe same bit in reply to an
IPROTO_ID
request. Introduction of thisfeature bumped the IPROTO protocol version up to 4.
Requested by @locker in tarantool/tarantool@6f29f9d.
The text was updated successfully, but these errors were encountered: