| 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 |
#### |
| 8 |
# 0) The test requires three servers. |
| 9 |
#### |
| 10 |
|
| 11 |
SET SESSION sql_log_bin = 0; |
| 12 |
call mtr.add_suppression("This member could not reach a majority of the members for more than 10 seconds. The member will now leave the group as instructed by the group_replication_unreachable_majority_timeout option"); |
| 13 |
call mtr.add_suppression("The server was automatically set into read only mode after an error was detected."); |
| 14 |
call mtr.add_suppression("\\[GCS\\] Timeout while waiting for the group communication engine to exit!"); |
| 15 |
call mtr.add_suppression("\\[GCS\\] The member has failed to gracefully leave the group."); |
| 16 |
call mtr.add_suppression("Started auto-rejoin procedure attempt*"); |
| 17 |
call mtr.add_suppression("Auto-rejoin procedure attempt*"); |
| 18 |
call mtr.add_suppression("Unable to initialize the Group Replication applier module."); |
| 19 |
call mtr.add_suppression("Replica SQL for channel 'group_replication_applier': Could not execute Update_rows event on table test.t1; Duplicate entry '1' for key 't1.PRIMARY'.*"); |
| 20 |
call mtr.add_suppression("Replica SQL for channel 'group_replication_applier': Worker .* failed executing transaction .*; Could not execute Update_rows event on table test.t1; Duplicate entry '1' for key 't1.PRIMARY'*"); |
| 21 |
call mtr.add_suppression("Replica SQL for channel 'group_replication_applier': ... The replica coordinator and worker threads are stopped,*"); |
| 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("Unable to confirm whether the server has left the group or not. Check performance_schema.replication_group_members to check group membership information."); |
| 25 |
SET SESSION sql_log_bin = 1; |
| 26 |
include/gr_autorejoin_monitoring.inc |
| 27 |
SET @debug_saved = @@GLOBAL.DEBUG; |
| 28 |
SET @@GLOBAL.DEBUG='+d,group_replication_rejoin_short_retry'; |
| 29 |
SET @@GLOBAL.DEBUG='+d,group_replication_stop_before_rejoin_loop'; |
| 30 |
include/start_and_bootstrap_group_replication.inc |
| 31 |
CREATE TABLE t1(a INT PRIMARY KEY); |
| 32 |
[connection server2] |
| 33 |
include/start_group_replication.inc |
| 34 |
[connection server3] |
| 35 |
include/start_group_replication.inc |
| 36 |
|
| 37 |
#### |
| 38 |
# 1) Add a local transaction to server1 so that it does fail on rejoin. |
| 39 |
#### |
| 40 |
[connection server1] |
| 41 |
SET @@GLOBAL.DEBUG='+d,block_applier_updates'; |
| 42 |
[connection server2] |
| 43 |
INSERT INTO t1 VALUES(0); |
| 44 |
UPDATE t1 SET a=1 WHERE a=0; |
| 45 |
[connection server3] |
| 46 |
[connection server1] |
| 47 |
SET DEBUG_SYNC = "now WAIT_FOR applier_read_blocked"; |
| 48 |
SET SESSION sql_log_bin= 0; |
| 49 |
INSERT INTO t1 VALUES(1); |
| 50 |
SET SESSION sql_log_bin= 1; |
| 51 |
|
| 52 |
#### |
| 53 |
# 2) Provoke a majority loss. |
| 54 |
#### |
| 55 |
|
| 56 |
[connection server1] |
| 57 |
SET GLOBAL group_replication_autorejoin_tries = 1; |
| 58 |
include/gr_provoke_majority_loss.inc |
| 59 |
# Kill and restart |
| 60 |
# Kill and restart |
| 61 |
SET DEBUG_SYNC = "now WAIT_FOR signal.autorejoin_entering_loop"; |
| 62 |
|
| 63 |
#### |
| 64 |
# 3) Verify that the member in the partitioned group will try to rejoin the |
| 65 |
# group the number of it is configured in |
| 66 |
# group_replication_autorejoin_tries sysvar. |
| 67 |
#### |
| 68 |
include/rpl_reconnect.inc |
| 69 |
[connection server2] |
| 70 |
SET @@global.group_replication_group_seeds="GROUP_SEEDS_SERVER2"; |
| 71 |
SET @@global.group_replication_local_address="LOCAL_ADDRESS_SERVER2"; |
| 72 |
include/start_and_bootstrap_group_replication.inc |
| 73 |
include/rpl_reconnect.inc |
| 74 |
[connection server3] |
| 75 |
SET @@global.group_replication_group_seeds="LOCAL_ADDRESS_SERVER2"; |
| 76 |
SET @@global.group_replication_local_address="LOCAL_ADDRESS_SERVER3"; |
| 77 |
include/start_group_replication.inc |
| 78 |
[connection server2] |
| 79 |
include/rpl_gr_wait_for_number_of_members.inc |
| 80 |
[connection server3] |
| 81 |
include/rpl_gr_wait_for_number_of_members.inc |
| 82 |
[connection server1] |
| 83 |
SET DEBUG_SYNC = "now SIGNAL signal.autorejoin_enter_loop"; |
| 84 |
SET @@GLOBAL.DEBUG='-d,block_applier_updates'; |
| 85 |
SET DEBUG_SYNC = "now SIGNAL resume_applier_read"; |
| 86 |
|
| 87 |
#### |
| 88 |
# 4) Verify that once it rejoins the applier error is triggered and member |
| 89 |
# remains in ERROR state. |
| 90 |
#### |
| 91 |
|
| 92 |
include/gr_wait_for_member_state.inc |
| 93 |
|
| 94 |
#### |
| 95 |
# 5) Cleanup. |
| 96 |
#### |
| 97 |
|
| 98 |
[connection server1] |
| 99 |
include/stop_group_replication.inc |
| 100 |
SET SESSION sql_log_bin= 0; |
| 101 |
DROP TABLE t1; |
| 102 |
SET SESSION sql_log_bin= 1; |
| 103 |
RESET SLAVE ALL FOR CHANNEL "group_replication_applier"; |
| 104 |
Warnings: |
| 105 |
Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead |
| 106 |
SET @@GLOBAL.DEBUG = @debug_saved; |
| 107 |
SET DEBUG_SYNC= 'RESET'; |
| 108 |
SET @@GLOBAL.group_replication_autorejoin_tries = default; |
| 109 |
include/gr_end_autorejoin_monitoring.inc |
| 110 |
[connection server2] |
| 111 |
DROP TABLE t1; |
| 112 |
include/group_replication_end.inc |