STOP GROUP_REPLICATION
Stops Group Replication. This statement requires the
GROUP_REPLICATION_ADMIN
privilege
(or the deprecated SUPER
privilege). As soon as you issue STOP
GROUP_REPLICATION
the member is set to
super_read_only=ON
, which
ensures that no writes can be made to the member while Group
Replication stops. Any other replication channels running on the
member are also stopped. Any user credentials that you specified
in the START GROUP_REPLICATION
statement when starting Group Replication on this member are
removed from memory, and must be supplied when you start Group
Replication again.
Use this statement with extreme caution because it removes the server instance from the group, meaning it is no longer protected by Group Replication's consistency guarantee mechanisms. To be completely safe, ensure that your applications can no longer connect to the instance before issuing this statement to avoid any chance of stale reads.
The
group_replication_components_stop_timeout
system variable specifies the time for which Group Replication
waits for each of its modules to complete ongoing processes
after this statement is issued. The timeout is used to resolve
situations in which Group Replication components cannot be
stopped normally, which can happen if the member is expelled
from the group while it is in an error state, or while a process
such as MySQL Enterprise Backup is holding a global lock on
tables on the member. In such situations, the member cannot stop
the applier thread or complete the distributed recovery process
to rejoin. STOP GROUP_REPLICATION
does not
complete until either the situation is resolved (for example, by
the lock being released), or the component timeout expires and
the modules are shut down regardless of their status. Prior to
MySQL 8.0.27, the default component timeout is 31536000 seconds,
or 365 days. With this setting, the component timeout does not
help in situations such as those just described, so a lower
setting is recommended in those versions of MySQL 8.0. Beginning
with MySQL 8.0.27, the default value is 300 seconds; this means
that Group Replication components are stopped after 5 minutes if
the situation is not resolved before that time, allowing the
member to be restarted and rejoin.