| 1 |
include/group_replication.inc [rpl_server_count=3] |
| 2 |
Warnings: |
| 3 |
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. |
| 4 |
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. |
| 5 |
[connection server1] |
| 6 |
# |
| 7 |
# Setup a new 2 member group |
| 8 |
# |
| 9 |
SET SESSION sql_log_bin= 0; |
| 10 |
call mtr.add_suppression("Replica SQL for channel 'group_replication_applier': Relay log read failure: Could not parse relay log event entry.*"); |
| 11 |
call mtr.add_suppression("The applier thread execution was aborted. Unable to process more transactions, this member will now leave the group."); |
| 12 |
call mtr.add_suppression("Fatal error during execution on the Applier process of Group Replication. The server will now leave the group."); |
| 13 |
call mtr.add_suppression("The server was automatically set into read only mode after an error was detected."); |
| 14 |
call mtr.add_suppression("Skipping leave operation: concurrent attempt to leave the group is on-going."); |
| 15 |
SET SESSION sql_log_bin= 1; |
| 16 |
include/start_and_bootstrap_group_replication.inc |
| 17 |
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB; |
| 18 |
INSERT INTO t1 VALUES (1); |
| 19 |
SET SESSION sql_log_bin= 0; |
| 20 |
call mtr.add_suppression("The member is leaving a group without being on one"); |
| 21 |
call mtr.add_suppression("Replica SQL for channel 'group_replication_applier': Relay log read failure: Could not parse relay log event entry.*"); |
| 22 |
call mtr.add_suppression("The applier thread execution was aborted. Unable to process more transactions, this member will now leave the group."); |
| 23 |
call mtr.add_suppression("Fatal error during execution on the Applier process of Group Replication. The server will now leave the group."); |
| 24 |
call mtr.add_suppression("The server was automatically set into read only mode after an error was detected."); |
| 25 |
call mtr.add_suppression("Skipping leave operation: concurrent attempt to leave the group is on-going."); |
| 26 |
SET SESSION sql_log_bin= 1; |
| 27 |
include/start_group_replication.inc |
| 28 |
SET @@GLOBAL.DEBUG='+d,block_applier_updates'; |
| 29 |
SET @@GLOBAL.DEBUG='+d,block_applier_updates'; |
| 30 |
# |
| 31 |
# Phase 1: |
| 32 |
# Start recovery on a new member and kill both donors |
| 33 |
# |
| 34 |
SET SESSION sql_log_bin= 0; |
| 35 |
call mtr.add_suppression("No suitable donor found, group replication recovery aborting."); |
| 36 |
call mtr.add_suppression("Fatal error during the incremental recovery process of Group Replication. The server will leave the group."); |
| 37 |
call mtr.add_suppression("The server was automatically set into read only mode after an error was detected."); |
| 38 |
call mtr.add_suppression("All donors left. Aborting group replication incremental recovery."); |
| 39 |
call mtr.add_suppression("Maximum number of retries when trying to connect to a donor reached. Aborting group replication incremental recovery."); |
| 40 |
call mtr.add_suppression("The member is leaving a group without being on one"); |
| 41 |
call mtr.add_suppression("The member is already leaving or joining a group."); |
| 42 |
call mtr.add_suppression("Error leaving the group"); |
| 43 |
call mtr.add_suppression("Skipping leave operation: concurrent attempt to leave the group is on-going."); |
| 44 |
SET SESSION sql_log_bin= 1; |
| 45 |
include/start_group_replication.inc |
| 46 |
# Find if server 1 or 2 is the donor |
| 47 |
# Stop group replication on the donor making it leave the group |
| 48 |
SET DEBUG_SYNC = "now WAIT_FOR applier_read_blocked"; |
| 49 |
SET @@GLOBAL.DEBUG='-d,block_applier_updates'; |
| 50 |
SET @@GLOBAL.DEBUG='+d,force_sql_thread_error'; |
| 51 |
SET DEBUG_SYNC = "now SIGNAL resume_applier_read"; |
| 52 |
include/gr_wait_for_member_state.inc |
| 53 |
SET @@GLOBAL.DEBUG='-d,force_sql_thread_error'; |
| 54 |
include/stop_group_replication.inc |
| 55 |
# Stop group replication on the failover donor making it leave the group |
| 56 |
SET DEBUG_SYNC = "now WAIT_FOR applier_read_blocked"; |
| 57 |
SET @@GLOBAL.DEBUG='-d,block_applier_updates'; |
| 58 |
SET @@GLOBAL.DEBUG='+d,force_sql_thread_error'; |
| 59 |
SET DEBUG_SYNC = "now SIGNAL resume_applier_read"; |
| 60 |
include/gr_wait_for_member_state.inc |
| 61 |
SET @@GLOBAL.DEBUG='-d,force_sql_thread_error'; |
| 62 |
include/stop_group_replication.inc |
| 63 |
# Recovery should fail on the joiner |
| 64 |
include/gr_wait_for_member_state.inc |
| 65 |
include/stop_group_replication.inc |
| 66 |
# |
| 67 |
# Phase 2 |
| 68 |
# Have 2 members on recovery and kill the donor |
| 69 |
# |
| 70 |
include/start_and_bootstrap_group_replication.inc |
| 71 |
SET @@GLOBAL.DEBUG='+d,block_applier_updates'; |
| 72 |
# Start recovery on the other 2 members |
| 73 |
SET SESSION sql_log_bin= 0; |
| 74 |
call mtr.add_suppression("No suitable donor found, group replication recovery aborting."); |
| 75 |
call mtr.add_suppression("Fatal error during the incremental recovery process of Group Replication. The server will leave the group."); |
| 76 |
call mtr.add_suppression("The server was automatically set into read only mode after an error was detected."); |
| 77 |
call mtr.add_suppression("Maximum number of retries when trying to connect to a donor reached. Aborting group replication incremental recovery."); |
| 78 |
call mtr.add_suppression("The member is leaving a group without being on one"); |
| 79 |
call mtr.add_suppression("The member is already leaving or joining a group."); |
| 80 |
call mtr.add_suppression("Error leaving the group"); |
| 81 |
call mtr.add_suppression("Skipping leave operation: concurrent attempt to leave the group is on-going."); |
| 82 |
SET SESSION sql_log_bin= 1; |
| 83 |
SET GLOBAL group_replication_recovery_reconnect_interval= 1; |
| 84 |
SET GLOBAL group_replication_recovery_retry_count= 2; |
| 85 |
include/start_group_replication.inc |
| 86 |
SET @debug_save= @@GLOBAL.DEBUG; |
| 87 |
SET @@GLOBAL.DEBUG='d,recovery_thread_wait_before_finish'; |
| 88 |
SET GLOBAL group_replication_recovery_reconnect_interval= 1; |
| 89 |
SET GLOBAL group_replication_recovery_retry_count= 2; |
| 90 |
include/start_group_replication.inc |
| 91 |
# Stop group replication on the donor making it leave the group |
| 92 |
SET DEBUG_SYNC = "now WAIT_FOR applier_read_blocked"; |
| 93 |
SET @@GLOBAL.DEBUG='-d,block_applier_updates'; |
| 94 |
SET @@GLOBAL.DEBUG='+d,force_sql_thread_error'; |
| 95 |
SET DEBUG_SYNC = "now SIGNAL resume_applier_read"; |
| 96 |
include/gr_wait_for_member_state.inc |
| 97 |
SET @@GLOBAL.DEBUG='-d,force_sql_thread_error'; |
| 98 |
include/stop_group_replication.inc |
| 99 |
# Recovery should fail on both joiners |
| 100 |
include/gr_wait_for_member_state.inc |
| 101 |
include/stop_group_replication.inc |
| 102 |
SET DEBUG_SYNC= "now SIGNAL signal.recovery_end"; |
| 103 |
include/gr_wait_for_member_state.inc |
| 104 |
include/stop_group_replication.inc |
| 105 |
# |
| 106 |
# Cleaning up |
| 107 |
# |
| 108 |
SET DEBUG_SYNC= 'RESET'; |
| 109 |
include/start_and_bootstrap_group_replication.inc |
| 110 |
SET DEBUG_SYNC= 'RESET'; |
| 111 |
include/start_group_replication.inc |
| 112 |
include/assert.inc [On the recovered member, the table should exist and have 1 elements] |
| 113 |
SET @@GLOBAL.DEBUG= @debug_save; |
| 114 |
include/start_group_replication.inc |
| 115 |
include/assert.inc [On the recovered member, the table should exist and have 1 elements] |
| 116 |
DROP TABLE t1; |
| 117 |
include/group_replication_end.inc |