mariadb/mysql-test/suite/rpl/t/rpl_shutdown_wait_slaves.test
Sergey Vojtovich 3568427d11 MDEV-18450 Slaves wait shutdown
The patches features an optional shutdown behavior to hold on until
after all connected slaves have been sent the last binlogged event.
The connected slave is one whose START SLAVE has been acknowledged and
that was not stopped since that though it could be technically
reconnecting in background.

The solution therefore disallows killing the dump thread until is has
found EOF of the latest binlog file.  It is up to the shutdown
requester (DBA) to set up a sufficiently large shutdown timeout value
for shudown to wait patiently until lagging behind slaves have been
synchronized. On the other hand if a specific slave needs exclusion
from synchronization the DBA would have to stop it manually which
would terminate its dump thread.

`mysqladmin shutdown' is extended with a `--wait_for_all_slaves' option
which translates to `SHUTDOW WAIT FOR ALL SLAVES' sql query
to enable the feature on the client side.

The patch also performs a small refactoring of the server shutdown
around close_connections() to introduce kill thread phases which
are two as of current.
2019-03-12 17:34:48 +02:00

11 lines
345 B
Text

#
# MDEV-18450 "Slow" shutdown to wait for slaves that are to be fed
# with everything in the master binlog before shutdown completes.
#
--source include/have_innodb.inc
--source include/have_debug.inc
--let $rpl_topology=1->2, 1->3, 1->4
--source include/rpl_init.inc
--source include/rpl_shutdown_wait_slaves.inc
--source include/rpl_end.inc