Debian Codegraph @

mysql-test/suite/group_replication/r/gr_acf_receiver_clone_on_rejoin.result

raw
1 include/group_replication.inc [rpl_server_count=4]
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 [connection server2]
7 [connection server3]
8
9 # 1. Install clone plugin on server1.
10
11 [connection server1]
12 INSTALL PLUGIN clone SONAME 'CLONE_PLUGIN';
13
14 # 2. Create replication channel ch1
15 # with SOURCE_CONNECTION_AUTO_FAILOVER enabled.
16 # And verify managed channel and non-managed source addition
17 # is successful in failover tables.
18
19 CHANGE REPLICATION SOURCE TO SOURCE_HOST='127.0.0.1', SOURCE_USER='root', SOURCE_AUTO_POSITION=1, SOURCE_CONNECTION_AUTO_FAILOVER=1, SOURCE_PORT=SERVER_MYPORT_4, SOURCE_CONNECT_RETRY=1, SOURCE_RETRY_COUNT=1 FOR CHANNEL 'ch1';
20 Warnings:
21 Note 1759 Sending passwords in plain text without SSL/TLS is extremely insecure.
22 Note 1760 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.
23 SELECT asynchronous_connection_failover_add_source('ch1', '127.0.0.1', SERVER_MYPORT_4, '', 90);
24 asynchronous_connection_failover_add_source('ch1', '127.0.0.1', SERVER_MYPORT_4, '', 90)
25 The UDF asynchronous_connection_failover_add_source() executed successfully.
26 SELECT asynchronous_connection_failover_add_managed('ch1', 'GroupReplication', 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa', '10.0.0.2', 3306, '', 80, 70);
27 asynchronous_connection_failover_add_managed('ch1', 'GroupReplication', 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa', '10.0.0.2', 3306, '', 80, 70)
28 The UDF asynchronous_connection_failover_add_managed() executed successfully.
29 include/assert.inc ['There are 2 rows in performance_schema.replication_asynchronous_connection_failover']
30 include/assert.inc ['The version of replication_asynchronous_connection_failover must be 2']
31 include/assert.inc ['There is 1 row in performance_schema.replication_asynchronous_connection_failover_managed']
32 include/assert.inc ['The version of replication_asynchronous_connection_failover_managed must be 1']
33 include/assert.inc ['SOURCE_CONNECTION_AUTO_FAILOVER must be enabled on ch1']
34
35 # 3. Bootstrap server1 and add some data
36 # Verify channel 'ch1' is running.
37
38 SET GLOBAL GROUP_REPLICATION_GROUP_SEEDS= "LOCAL_ADDRESS_SERVER1, LOCAL_ADDRESS_SERVER2, LOCAL_ADDRESS_SERVER3";
39 include/start_and_bootstrap_group_replication.inc
40 CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB;
41 INSERT INTO t1 VALUES (1);
42 INSERT INTO t1 VALUES (2);
43 include/assert.inc ['CHANNEL ch1 is running']
44
45 # 4. Install the clone plugin and start GR on server3
46
47 [connection server3]
48 INSTALL PLUGIN clone SONAME 'CLONE_PLUGIN';
49
50 # 5. Create replication channel ch1
51 # with SOURCE_CONNECTION_AUTO_FAILOVER enabled.
52 # And verify managed channel and non-managed source synced
53 # is successful to failover tables.
54
55 CHANGE REPLICATION SOURCE TO SOURCE_HOST='127.0.0.1', SOURCE_USER='root', SOURCE_AUTO_POSITION=1, SOURCE_CONNECTION_AUTO_FAILOVER=0, SOURCE_PORT=SERVER_MYPORT_4, SOURCE_CONNECT_RETRY=1, SOURCE_RETRY_COUNT=1 FOR CHANNEL 'ch1';
56 Warnings:
57 Note 1759 Sending passwords in plain text without SSL/TLS is extremely insecure.
58 Note 1760 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.
59 SET GLOBAL GROUP_REPLICATION_GROUP_SEEDS= "LOCAL_ADDRESS_SERVER1, LOCAL_ADDRESS_SERVER2, LOCAL_ADDRESS_SERVER3";
60 include/start_group_replication.inc
61 include/assert.inc ['There are 2 rows in performance_schema.replication_asynchronous_connection_failover']
62 include/assert.inc ['The version of replication_asynchronous_connection_failover must be 2']
63 include/assert.inc ['There is 1 row in performance_schema.replication_asynchronous_connection_failover_managed']
64 include/assert.inc ['The version of replication_asynchronous_connection_failover_managed must be 1']
65 include/assert.inc ['SOURCE_CONNECTION_AUTO_FAILOVER must be enabled for ch1']
66
67 # 6. Restart server 2 with a monitoring process (mysqld_safe)
68
69 [connection server2]
70 CHANGE REPLICATION SOURCE TO SOURCE_HOST='10.0.0.1', SOURCE_USER='root', SOURCE_AUTO_POSITION=1, SOURCE_CONNECTION_AUTO_FAILOVER=0, SOURCE_PORT=3306, SOURCE_CONNECT_RETRY=1, SOURCE_RETRY_COUNT=1 FOR CHANNEL 'ch1';
71 Warnings:
72 Note 1759 Sending passwords in plain text without SSL/TLS is extremely insecure.
73 Note 1760 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.
74 SET PERSIST local_infile= ON;
75 include/spawn_monitoring_process.inc
76
77 # 7. Setup server2 so group replication starts on boot
78 # Install the Clone plugin
79
80 INSTALL PLUGIN clone SONAME 'CLONE_PLUGIN';
81
82 # 8. On a empty server2 start group replication
83 # Wait for it to restart and come back
84 # Check clone was completed
85
86 SET GLOBAL group_replication_clone_threshold= 1;
87 SET GLOBAL GROUP_REPLICATION_GROUP_SEEDS= "LOCAL_ADDRESS_SERVER1, LOCAL_ADDRESS_SERVER2, LOCAL_ADDRESS_SERVER3";
88 START GROUP_REPLICATION;
89 include/rpl_reconnect.inc
90 include/gr_wait_for_member_state.inc
91 include/assert.inc [Clone must be completed]
92
93 # 9. Verify data has been properly cloned in server2.
94
95 include/diff_tables.inc [server1:test.t1, server2:test.t1, server3:test.t1]
96 include/assert.inc ['There are 2 rows in performance_schema.replication_asynchronous_connection_failover']
97 include/assert.inc ['The version of replication_asynchronous_connection_failover must be 2']
98 include/assert.inc ['There is 1 row in performance_schema.replication_asynchronous_connection_failover_managed']
99 include/assert.inc ['The version of replication_asynchronous_connection_failover_managed must be 1']
100 include/assert.inc ['SOURCE_CONNECTION_AUTO_FAILOVER must be enabled for ch1']
101
102 # 10. Get server2 expelled.
103
104 [connection server2]
105 SET GLOBAL super_read_only = 0;
106 SET @debug_saved = @@GLOBAL.DEBUG;
107 SET @@GLOBAL.DEBUG='+d,group_replication_stop_before_rejoin';
108 include/gr_expel_member_from_group.inc
109 SET SESSION sql_log_bin = 0;
110 CREATE TABLE pid_table(pid_no INT PRIMARY KEY);
111 LOAD DATA LOCAL INFILE 'pid_file' INTO TABLE pid_table;
112 DROP TABLE pid_table;
113 SET SESSION sql_log_bin = 1;
114 SET GLOBAL super_read_only = 1;
115 SET DEBUG_SYNC = "now WAIT_FOR signal.autorejoin_waiting";
116 include/assert.inc [Auto-rejoin should be running]
117
118 # 11. Add more data and new source to failover table
119 # on server 1 before server2 rejoins.
120
121 [connection server1]
122 SELECT asynchronous_connection_failover_add_source('ch1', '10.0.0.1', 3307, '', 50);
123 asynchronous_connection_failover_add_source('ch1', '10.0.0.1', 3307, '', 50)
124 The UDF asynchronous_connection_failover_add_source() executed successfully.
125 INSERT INTO t1 VALUES (3);
126 INSERT INTO t1 VALUES (4);
127 include/assert.inc ['There are 3 rows in performance_schema.replication_asynchronous_connection_failover']
128 include/assert.inc ['The version of replication_asynchronous_connection_failover must be 2']
129 include/rpl_sync.inc
130
131 # 12. Unblock the rejoin, another clone should happen
132
133 [connection server2]
134 SET GLOBAL group_replication_clone_threshold= 1;
135 SET DEBUG_SYNC = "now SIGNAL signal.autorejoin_continue";
136 include/rpl_reconnect.inc
137 include/gr_wait_for_member_state.inc
138 include/assert.inc [Clone must be completed]
139
140 # 13. Verify if the data and failover tables
141 # has been properly cloned in server2.
142
143 include/diff_tables.inc [server1:test.t1, server2:test.t1, server3:test.t1]
144 include/assert.inc ['There are 3 rows in performance_schema.replication_asynchronous_connection_failover']
145 include/assert.inc ['The version of replication_asynchronous_connection_failover must be 3']
146 include/assert.inc ['There is 1 row in performance_schema.replication_asynchronous_connection_failover_managed']
147 include/assert.inc ['The version of replication_asynchronous_connection_failover_managed must be 1']
148 include/assert.inc ['SOURCE_CONNECTION_AUTO_FAILOVER must be enabled for ch1']
149
150 # 14. Stop the replication channel 'ch1' on server1, and change
151 # primary to server2. The asynchronous replication channel (ch1)
152 # connection will be started without any error.
153
154 [connection server1]
155 include/stop_slave.inc [FOR CHANNEL 'ch1']
156 [connection server2]
157 SELECT group_replication_set_as_primary("SERVER2_UUID");
158 group_replication_set_as_primary("SERVER2_UUID")
159 Primary server switched to: SERVER2_UUID
160 include/gr_wait_primary_member_uuid.inc
161 include/wait_for_slave_to_start.inc [FOR CHANNEL 'ch1']
162 include/assert.inc [Verify replica_monitor thread is running]
163
164 # 15. Cleanup
165
166 DROP TABLE t1;
167 RESET PERSIST IF EXISTS group_replication_enforce_update_everywhere_checks;
168 RESET PERSIST IF EXISTS group_replication_single_primary_mode;
169 RESET PERSIST IF EXISTS group_replication_group_name;
170 RESET PERSIST IF EXISTS group_replication_local_address;
171 RESET PERSIST IF EXISTS group_replication_group_seeds;
172 RESET PERSIST IF EXISTS group_replication_communication_stack;
173 RESET PERSIST IF EXISTS group_replication_start_on_boot;
174 RESET PERSIST IF EXISTS local_infile;
175 include/stop_slave.inc [FOR CHANNEL 'ch1']
176 include/rpl_reset_slave.inc
177 [connection server1]
178 include/stop_group_replication.inc
179 UNINSTALL PLUGIN clone;
180 include/rpl_reset_slave.inc
181 set session sql_log_bin=0;
182 call mtr.add_suppression("The Monitor IO thread failed to connect to the source .* for channel 'ch1', thence it will try to connect to another source.");
183 set session sql_log_bin=1;
184 [connection server3]
185 include/stop_group_replication.inc
186 UNINSTALL PLUGIN clone;
187 include/rpl_reset_slave.inc
188 [connection server2]
189 include/stop_group_replication.inc
190 UNINSTALL PLUGIN clone;
191 set session sql_log_bin=0;
192 call mtr.add_suppression("Recovery from source pos .* and file .* for channel 'ch1'. Previous relay log pos and relay log file had been set to .* respectively.");
193 call mtr.add_suppression("The Monitor IO thread failed to connect to the source .* for channel 'ch1', thence it will try to connect to another source.");
194 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*");
195 call mtr.add_suppression("Member was expelled from the group due to network failures, changing member status to ERROR.");
196 call mtr.add_suppression("The server was automatically set into read only mode after an error was detected.");
197 call mtr.add_suppression("Started auto-rejoin procedure attempt*");
198 call mtr.add_suppression("Auto-rejoin procedure attempt 1 of 1");
199 call mtr.add_suppression("Clone removing all user data for provisioning: Started");
200 call mtr.add_suppression("Clone removing all user data for provisioning: Finished");
201 call mtr.add_suppression("Applier metadata information for channel 'ch1' was found after a clone operation. Relay log recovery will be executed to adjust positions .*");
202 call mtr.add_suppression("Error during .* Could not locate rotate event from the source.");
203 call mtr.add_suppression("Server was not able to find a rotate event from source server to initialize relay log recovery for channel .*");
204 set session sql_log_bin=1;
205 include/clean_monitoring_process.inc
206 include/group_replication_end.inc