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 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137
|
include/group_replication.inc
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. Bootstrap M1 and install clone plugin.
include/start_and_bootstrap_group_replication.inc
INSTALL PLUGIN clone SONAME 'CLONE_PLUGIN';
CREATE TABLE t1 (a INT PRIMARY KEY);
INSERT INTO t1 values (1);
INSERT INTO t1 values (2);
# 2. Setup clone on M2.
[connection server2]
include/spawn_monitoring_process.inc
INSTALL PLUGIN clone SONAME 'CLONE_PLUGIN';
# 3. Force clone. Force applier failure on M2.
# Start GR on M2 fails. Applier fails before clone stops applier.
# Assert clone never starts.
[connection server2]
SET GLOBAL group_replication_clone_threshold= 1;
SET GLOBAL group_replication_group_name= "GROUP_NAME";
SET @@GLOBAL.DEBUG= '+d,force_sql_thread_error';
SET @@GLOBAL.DEBUG='+d,gr_clone_before_applier_stop';
START GROUP_REPLICATION;;
[connection server_2]
SET DEBUG_SYNC = 'now SIGNAL applier_stopped';
SET @@GLOBAL.DEBUG='-d,gr_clone_before_applier_stop';
[connection server2]
SET @@GLOBAL.DEBUG= '-d,force_sql_thread_error';
SET DEBUG_SYNC= 'RESET';
include/assert.inc [Clone must not start.]
# 4. Reset debug points for applier failures.
# Restart GR on M2.
# Assert clone starts and group_replication_applier SQL thread is OFF.
SET @@GLOBAL.DEBUG='+d,gr_clone_wait';
START GROUP_REPLICATION;
SET DEBUG_SYNC = 'now WAIT_FOR gr_clone_paused';
SET @@GLOBAL.DEBUG='-d,gr_clone_wait';
include/assert.inc [group_replication_applier SQL Thread will be off.]
SET DEBUG_SYNC = 'now SIGNAL gr_clone_continue';
include/rpl_reconnect.inc
include/gr_wait_for_member_state.inc
include/assert.inc [Clone must be completed]
# 5. Block applier on M2.
# Uninstall clone on M1 so that clone fails.
# Create some transactions on M1 to create applier backlog on M2.
SET @@GLOBAL.DEBUG='+d,block_applier_updates';
[connection server1]
UNINSTALL PLUGIN clone;
INSERT INTO t1 values (3);
INSERT INTO t1 values (4);
[connection server2]
# 6. Stop GR on M2 without committing the received transactions.
# Create transactions on M1 for M2 to clone.
SET DEBUG_SYNC = "now WAIT_FOR applier_read_blocked";
SET @@GLOBAL.DEBUG='-d,block_applier_updates';
SET @@GLOBAL.DEBUG='+d,force_sql_thread_error';
SET DEBUG_SYNC = "now SIGNAL resume_applier_read";
include/gr_wait_for_member_state.inc
SET @@GLOBAL.DEBUG='-d,force_sql_thread_error';
include/stop_group_replication.inc
[connection server1]
INSERT INTO t1 values (5);
INSERT INTO t1 values (6);
# 7. Start GR on M2.
# Clone will fail and incremental recovery will start.
# Applier will be OFF till clone failure is detected.
[connection server1]
SET @@GLOBAL.DEBUG='+d,block_applier_updates';
[connection server2]
SET @@GLOBAL.DEBUG='+d,gr_run_clone_query_fail_once';
SET GLOBAL group_replication_clone_threshold= 1;
START GROUP_REPLICATION;
SET DEBUG_SYNC = 'now WAIT_FOR signal.run_clone_query_waiting';
SET @@GLOBAL.DEBUG='-d,gr_run_clone_query_fail_once';
include/assert.inc ["Clone is executing"]
include/assert.inc [group_replication_applier SQL Thread will be OFF.]
SET DEBUG_SYNC = 'now SIGNAL signal.run_clone_query_continue';
include/assert.inc [group_replication_applier SQL Thread will be ON.]
[connection server1]
SET DEBUG_SYNC = "now WAIT_FOR applier_read_blocked";
SET @@GLOBAL.DEBUG='-d,block_applier_updates';
SET DEBUG_SYNC = "now SIGNAL resume_applier_read";
[connection server2]
include/gr_wait_for_member_state.inc
include/diff_tables.inc [server1:test.t1, server2:test.t1]
# 8. Cleanup.
[connection server1]
DROP TABLE t1;
set session sql_log_bin=0;
call mtr.add_suppression("Timeout while waiting for the group communication engine to exit!");
call mtr.add_suppression("The member has failed to gracefully leave the group.");
set session sql_log_bin=1;
[connection server2]
set session sql_log_bin=0;
call mtr.add_suppression("Replica SQL for channel 'group_replication_applier': Relay log read failure: *.*");
call mtr.add_suppression("The applier thread execution was aborted. *.*");
call mtr.add_suppression("Error running query, replica SQL thread aborted. *");
call mtr.add_suppression("Fatal error during execution on the Applier process of Group Replication. The server will now leave the group.");
call mtr.add_suppression("Skipping leave operation: concurrent attempt to leave the group is on-going.");
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.");
call mtr.add_suppression("The server was automatically set into read only mode after an error was detected.");
call mtr.add_suppression("Unable to initialize the Group Replication applier module.");
call mtr.add_suppression("There was a previous plugin error while the member joined the group. The member will now exit the group.");
call mtr.add_suppression("This member will start distributed recovery using clone. It is due to the number of missing transactions being higher than the configured threshold of 1.");
call mtr.add_suppression("Clone removing all user data for provisioning: *");
call mtr.add_suppression("Internal query: CLONE INSTANCE FROM *");
call mtr.add_suppression("There was an issue when cloning from another server: *");
call mtr.add_suppression("Due to some issue on the previous step distributed recovery is now executing: Incremental Recovery.");
call mtr.add_suppression("Timeout while waiting for the group communication engine to be ready!");
call mtr.add_suppression("The group communication engine is not ready for the member to join. .*");
call mtr.add_suppression("The member was unable to join the group.*");
call mtr.add_suppression("There was an issue when configuring the remote cloning process: The plugin was not able to stop the group_replication_applier channel.");
set session sql_log_bin=1;
RESET PERSIST group_replication_group_name;
RESET PERSIST group_replication_local_address;
RESET PERSIST group_replication_group_seeds;
RESET PERSIST group_replication_start_on_boot;
RESET PERSIST IF EXISTS group_replication_communication_stack;
include/clean_monitoring_process.inc
include/group_replication_end.inc
|