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
|
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 and create table test.t1
include/start_and_bootstrap_group_replication.inc
# 2. Start server2 and server3
[connection server2]
set session sql_log_bin=0;
call mtr.add_suppression("A configuration change was killed in this member. The member will now leave the group as its configuration may have diverged.");
call mtr.add_suppression("The server was automatically set into read only mode after an error was detected.");
call mtr.add_suppression("Error while executing a group configuration operation: This operation ended in error as it was not possible to wait for the execution of the plugin queued transactions. The member will now leave the group.");
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. Change to multi primary mode
[connection server1]
SELECT group_replication_switch_to_multi_primary_mode();
group_replication_switch_to_multi_primary_mode()
Mode switched to multi-primary successfully.
# 5. server2 shall fail and leave the group
[connection server1]
include/rpl_gr_wait_for_number_of_members.inc
# 6. 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';
# 7. Cleanup
include/group_replication_end.inc
|