1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
include/group_replication.inc
Warnings:
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information.
[connection server1]
# 1. Start GR on server1 & server2.
[connection server1]
include/start_and_bootstrap_group_replication.inc
[connection server2]
SET SESSION sql_log_bin = 0;
call mtr.add_suppression("There was an issue on the primary election process: Could not wait for the execution of local transactions. The member will now leave the group.");
call mtr.add_suppression("Skipping leave operation: concurrent attempt to leave the group is on-going.");
call mtr.add_suppression("The group replication applier thread has received KILL request.");
call mtr.add_suppression("Fatal error during execution on the Applier process of Group Replication. The server will now leave the group.");
call mtr.add_suppression("Skipping leave operation: member already left the group.");
call mtr.add_suppression("The server was automatically set into read only mode after an error was detected.");
call mtr.add_suppression("Error, maximum number of retries exceeded when waiting for the internal server session state to be operating");
call mtr.add_suppression("Failed to establish an internal server connection to execute plugin operations");
SET SESSION sql_log_bin = 1;
include/start_group_replication.inc
# 2. Add debug point to
# 2.1. make sure primary change fails on server2.
# 2.2. delay primary change operation to allow shutdown to send KILL signals
# 2.3. block applier processing so suspension packets is not processed
SET @@GLOBAL.DEBUG= '+d,group_replication_wait_for_current_events_execution_fail';
# 3. Stop GR on server1, server2 become primary
[connection server1]
include/stop_group_replication.inc
# 4. Primary change happens on server2 but is delayed with help of
# group_replication_wait_for_current_events_execution_fail debug point.
[connection server2]
SET DEBUG_SYNC= "now WAIT_FOR signal.group_replication_wait_for_current_events_execution_fail_applier_add_suspension_packet";
# 5. Execute shutdown so that applier threads receives the KILL signal.
# restart:--group-replication-group-name=GROUP_REPLICATION_GROUP_NAME --group_replication_local_address=GROUP_REPLICATION_LOCAL_ADDRESS --group_replication_group_seeds=GROUP_REPLICATION_GROUP_SEEDS --group_replication_single_primary_mode=1 --group_replication_enforce_update_everywhere_checks=0
include/rpl_reconnect.inc
# 6. Cleanup
[connection server1]
include/start_and_bootstrap_group_replication.inc
[connection server2]
include/start_group_replication.inc
include/group_replication_end.inc
|