| 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 |
# 1. Create a table on server1 and generate workload to be recovered |
| 9 |
include/start_and_bootstrap_group_replication.inc |
| 10 |
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB; |
| 11 |
INSERT INTO t1 VALUES (1); |
| 12 |
|
| 13 |
######################## |
| 14 |
# 2. SQL thread testing |
| 15 |
|
| 16 |
####################################################### |
| 17 |
# 2.1 Try to make server2 to join the group for 3 times |
| 18 |
# forcing the SQL thread to stop |
| 19 |
[connection server2] |
| 20 |
SET SESSION sql_log_bin= 0; |
| 21 |
CALL mtr.add_suppression("Error while creating the group replication recovery channel with donor"); |
| 22 |
CALL mtr.add_suppression("Maximum number of retries when trying to connect to a donor reached"); |
| 23 |
CALL mtr.add_suppression("Fatal error during the incremental recovery process of Group Replication. The server will leave the group."); |
| 24 |
CALL mtr.add_suppression("Already leaving or joining a group"); |
| 25 |
CALL mtr.add_suppression("Error leaving the group"); |
| 26 |
CALL mtr.add_suppression("Table 't1' already exists"); |
| 27 |
CALL mtr.add_suppression("Error while starting the group replication incremental recovery receiver/applier threads"); |
| 28 |
call mtr.add_suppression("Skipping leave operation: concurrent attempt to leave the group is on-going."); |
| 29 |
call mtr.add_suppression("The server was automatically set into read only mode after an error was detected."); |
| 30 |
SET SESSION sql_log_bin= 1; |
| 31 |
SET @saved_reconnect_interval= @@GLOBAL.group_replication_recovery_reconnect_interval; |
| 32 |
SET GLOBAL group_replication_recovery_reconnect_interval= 1 # second; |
| 33 |
SET @saved_retry_count= @@GLOBAL.group_replication_recovery_retry_count; |
| 34 |
SET GLOBAL group_replication_recovery_retry_count= 3; |
| 35 |
SET SESSION sql_log_bin= 0; |
| 36 |
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB; |
| 37 |
SET SESSION sql_log_bin= 1; |
| 38 |
# Adding debug point 'pause_after_sql_thread_stop_hook' to @@GLOBAL.debug |
| 39 |
|
| 40 |
##################################################### |
| 41 |
# 2.2 Wait until server2 gave up on joining the group |
| 42 |
include/start_group_replication.inc |
| 43 |
# Removing debug point 'pause_after_sql_thread_stop_hook' from @@GLOBAL.debug |
| 44 |
SET @@GLOBAL.group_replication_recovery_reconnect_interval= @saved_reconnect_interval; |
| 45 |
SET @@GLOBAL.group_replication_recovery_retry_count= @saved_retry_count; |
| 46 |
include/stop_group_replication.inc |
| 47 |
SET SESSION sql_log_bin= 0; |
| 48 |
DROP TABLE t1; |
| 49 |
SET SESSION sql_log_bin= 1; |
| 50 |
|
| 51 |
##################################################################### |
| 52 |
# 2.3 Wait until server2 had left the group to move to the next phase |
| 53 |
include/rpl_gr_wait_for_number_of_members.inc |
| 54 |
|
| 55 |
####################### |
| 56 |
# 3. I/O thread testing |
| 57 |
|
| 58 |
############################################################################ |
| 59 |
# 3.1 Rotate and purge the binary log on server1 to make recovery unfeasible |
| 60 |
FLUSH BINARY LOGS; |
| 61 |
include/stop_dump_threads.inc |
| 62 |
PURGE BINARY LOGS TO 'CURRENT_BINLOG_FILE'; |
| 63 |
SET SESSION sql_log_bin= 0; |
| 64 |
CALL mtr.add_suppression("Cannot replicate to server with server_uuid*"); |
| 65 |
SET SESSION sql_log_bin= 1; |
| 66 |
|
| 67 |
############################################################# |
| 68 |
# 3.2 Try to make server3 to join the group for up to 3 times |
| 69 |
SET SESSION sql_log_bin= 0; |
| 70 |
CALL mtr.add_suppression("Replica I/O for channel 'group_replication_recovery': Got fatal error 1236*"); |
| 71 |
CALL mtr.add_suppression("Maximum number of retries when trying to connect to a donor reached"); |
| 72 |
CALL mtr.add_suppression("Fatal error during the incremental recovery process of Group Replication. The server will leave the group."); |
| 73 |
CALL mtr.add_suppression("Already leaving or joining a group"); |
| 74 |
CALL mtr.add_suppression("Error leaving the group"); |
| 75 |
CALL mtr.add_suppression("Error while starting the group replication incremental recovery"); |
| 76 |
call mtr.add_suppression("Skipping leave operation: concurrent attempt to leave the group is on-going."); |
| 77 |
call mtr.add_suppression("This member will start distributed recovery using clone. It is due to no ONLINE member has the missing data for recovering in its binary logs."); |
| 78 |
call mtr.add_suppression("There was an issue when configuring the remote cloning process: The clone plugin is not present or active in this server."); |
| 79 |
call mtr.add_suppression("No valid or ONLINE members exist to get the missing data from the group. For cloning check if donors of the same version and with clone plugin installed exist. For incremental recovery check.*"); |
| 80 |
call mtr.add_suppression("The server was automatically set into read only mode after an error was detected."); |
| 81 |
SET SESSION sql_log_bin= 1; |
| 82 |
SET @saved_reconnect_interval= @@GLOBAL.group_replication_recovery_reconnect_interval; |
| 83 |
SET GLOBAL group_replication_recovery_reconnect_interval= 1 # second; |
| 84 |
SET @saved_retry_count= @@GLOBAL.group_replication_recovery_retry_count; |
| 85 |
SET GLOBAL group_replication_recovery_retry_count= 3; |
| 86 |
# Adding debug point 'pause_after_io_thread_stop_hook' to @@GLOBAL.debug |
| 87 |
|
| 88 |
##################################################### |
| 89 |
# 3.3 Wait until server3 gave up on joining the group |
| 90 |
include/start_group_replication.inc |
| 91 |
SET @@GLOBAL.group_replication_recovery_reconnect_interval= @saved_reconnect_interval; |
| 92 |
SET @@GLOBAL.group_replication_recovery_retry_count= @saved_retry_count; |
| 93 |
# Removing debug point 'pause_after_io_thread_stop_hook' from @@GLOBAL.debug |
| 94 |
|
| 95 |
################################################################ |
| 96 |
# 4. Wait until server1 be alone in the group to do the clean up |
| 97 |
include/rpl_gr_wait_for_number_of_members.inc |
| 98 |
DROP TABLE t1; |
| 99 |
include/group_replication_end.inc |