← Back
Editing: gr_exit_state_action_on_majority_loss.result
######################################################################### # 0) Setup group of 3 members (M1, M2 and M3). ######################################################################### 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 master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. [connection server1] [connection server1] SET SESSION sql_log_bin = 0; call mtr.add_suppression("read failed"); call mtr.add_suppression("This member could not reach a majority of the members for more than.*"); 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."); call mtr.add_suppression("\\[GCS\\] Timeout while waiting for the group communication engine to exit!"); call mtr.add_suppression("\\[GCS\\] The member has failed to gracefully leave the group."); call mtr.add_suppression("\\[GCS\\] read failed"); call mtr.add_suppression("Fatal error during execution of Group Replication"); SET SESSION sql_log_bin = 1; [connection server2] [connection server3] ######################################################################### # 1) Force majority loss. ######################################################################### [connection server2] [connection server3] ######################################################################### # 1.1) Verify that member 1 went to ERROR state. ######################################################################### [connection server1] include/gr_wait_for_member_state.inc include/assert.inc [super_read_only should be enabled] ######################################################################### # 2) Relaunch group with exit state action to ABORT_SERVER. ######################################################################### [connection server1] include/stop_group_replication.inc include/start_and_bootstrap_group_replication.inc include/rpl_reconnect.inc [connection server2] SET @@global.group_replication_group_seeds="GROUP_SEEDS_SERVER2"; SET @@global.group_replication_local_address="LOCAL_ADDRESS_SERVER2"; SET @@global.group_replication_ip_whitelist="GROUP_REPLICATION_GROUP_WHITELIST"; include/start_group_replication.inc include/rpl_reconnect.inc [connection server3] SET @@global.group_replication_group_seeds="GROUP_SEEDS_SERVER3"; SET @@global.group_replication_local_address="LOCAL_ADDRESS_SERVER3"; SET @@global.group_replication_ip_whitelist="GROUP_REPLICATION_GROUP_WHITELIST"; include/start_group_replication.inc include/rpl_gr_wait_for_number_of_members.inc [connection server1] SET @@GLOBAL.group_replication_exit_state_action = ABORT_SERVER; ######################################################################### # 3) Force another majority loss. ######################################################################### [connection server2] [connection server3] ######################################################################### # 4) Verify that member 1 aborted. ######################################################################### [connection server1] ######################################################################### # 5) Relaunch all members. ######################################################################### include/rpl_reconnect.inc [connection server1] SET @@global.group_replication_group_seeds="GROUP_SEEDS_SERVER1"; SET @@global.group_replication_local_address="LOCAL_ADDRESS_SERVER1"; SET @@global.group_replication_ip_whitelist="GROUP_REPLICATION_GROUP_WHITELIST"; include/start_and_bootstrap_group_replication.inc include/rpl_reconnect.inc [connection server2] SET @@global.group_replication_group_seeds="GROUP_SEEDS_SERVER2"; SET @@global.group_replication_local_address="LOCAL_ADDRESS_SERVER2"; SET @@global.group_replication_ip_whitelist="GROUP_REPLICATION_GROUP_WHITELIST"; include/start_group_replication.inc include/rpl_reconnect.inc [connection server3] SET @@global.group_replication_group_seeds="GROUP_SEEDS_SERVER3"; SET @@global.group_replication_local_address="LOCAL_ADDRESS_SERVER3"; SET @@global.group_replication_ip_whitelist="GROUP_REPLICATION_GROUP_WHITELIST"; include/start_group_replication.inc include/rpl_gr_wait_for_number_of_members.inc ######################################################################### # 6) Cleanup. ######################################################################### include/group_replication_end.inc
Save File
Cancel