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
|
include/group_replication.inc [rpl_server_count=3]
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. Server1 start, bootstrap the group
include/start_and_bootstrap_group_replication.inc
# 2. Start server2 and server3
[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("The server was automatically set into read only mode after an error was detected.");
call mtr.add_suppression("Skipping leave operation: concurrent attempt to leave the group is on-going.");
set session sql_log_bin=1;
include/start_group_replication.inc
[connection server3]
include/start_group_replication.inc
# 3. Fake a stopped applier on server2
[connection server2]
SET @@GLOBAL.DEBUG= '+d,group_replication_wait_for_gtid_execution_force_error';
# 4. Set server2 weight higher to be new primary server
SET GLOBAL group_replication_member_weight= 90;
# 5. Stop primary member that will force election from another member
[connection server1]
include/stop_group_replication.inc
# 6. Server2 will fail (applier thread stopped) and leave the group
[connection server3]
include/rpl_gr_wait_for_number_of_members.inc
# 7. Server3 is the new primary
include/gr_assert_primary_member.inc
# 8. Confirm server2 is on ERROR state
[connection server2]
include/gr_wait_for_member_state.inc
SET @@GLOBAL.DEBUG= '-d,group_replication_wait_for_gtid_execution_force_error';
# 9. Cleanup
SET @@GLOBAL.group_replication_member_weight= DEFAULT;
include/group_replication_end.inc
|