Debian Codegraph @

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

raw
1
2 ############################################################
3 # 1. Create a group with 1 member and schedule a periodic
4 # event to create some load in the group.
5 include/group_replication.inc [rpl_server_count=3]
6 Warnings:
7 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
8 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.
9 [connection server1]
10 [connection server1]
11 SET SESSION sql_log_bin= 0;
12 call mtr.add_suppression("On shutdown there was a timeout on the Group Replication recovery module termination. Check the log for more details");
13 call mtr.add_suppression("Fatal error during the incremental recovery process of Group Replication. The server will leave the group.");
14 call mtr.add_suppression("The server was automatically set into read only mode after an error was detected.");
15 call mtr.add_suppression("Error leaving the group");
16 call mtr.add_suppression("All donors left. Aborting group replication incremental recovery.");
17 call mtr.add_suppression("This member has more executed transactions *.*");
18 call mtr.add_suppression("The member contains transactions not present in the group. It is only allowed to *.*");
19 call mtr.add_suppression("The member is already leaving or joining a group.");
20 call mtr.add_suppression("Skipping leave operation: member already left the group.");
21 call mtr.add_suppression("Skipping leave operation: concurrent attempt to leave the group is on-going.");
22 call mtr.add_suppression("Maximum number of retries when trying to connect to a donor reached. Aborting group replication incremental recovery.");
23 call mtr.add_suppression("Transaction cannot be executed while Group Replication is stopping.");
24 call mtr.add_suppression("Run function 'before_commit' in plugin 'group_replication' failed");
25 call mtr.add_suppression("While leaving the group due to a stop, shutdown or failure there was a timeout receiving a view change. This can lead to a possible inconsistent state. Check the log for more details");
26 call mtr.add_suppression("On shutdown there was a timeout on the Group Replication applier termination.");
27 SET SESSION sql_log_bin= 1;
28 CREATE TABLE t1 (a INT PRIMARY KEY AUTO_INCREMENT NOT NULL);
29 SET @old_event_scheduler= @@global.event_scheduler;
30 SET GLOBAL EVENT_SCHEDULER= ON;
31 CREATE EVENT IF NOT EXISTS e1
32 ON SCHEDULE
33 EVERY 1 SECOND
34 STARTS CURRENT_TIMESTAMP + INTERVAL 1 SECOND
35 ENDS CURRENT_TIMESTAMP + INTERVAL 40 SECOND
36 ON COMPLETION PRESERVE
37 ENABLE
38 COMMENT 'Test with events'
39 DO
40 BEGIN
41 DECLARE v INTEGER;
42 DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
43 SET v=0;
44 WHILE v < 10
45 DO
46 INSERT INTO test.t1 values (NULL);
47 SET v = v+1;
48 END WHILE;
49 END//
50
51 ############################################################
52 # 2. Add error suppressions.
53 [connection server1]
54 SET SESSION sql_log_bin = 0;
55 call mtr.add_suppression("Replica SQL for channel 'group_replication_applier': Relay log read failure: Could not parse relay log event entry.*");
56 call mtr.add_suppression("The applier thread execution was aborted. Unable to process more transactions, this member will now leave the group.");
57 call mtr.add_suppression("Fatal error during execution on the Applier process of Group Replication. The server will now leave the group.");
58 call mtr.add_suppression("The server was automatically set into read only mode after an error was detected.");
59 call mtr.add_suppression("Skipping leave operation: concurrent attempt to leave the group is on-going.");
60 SET SESSION sql_log_bin = 1;
61 [connection server2]
62 SET SESSION sql_log_bin= 0;
63 call mtr.add_suppression("On shutdown there was a timeout on the Group Replication recovery module termination. Check the log for more details");
64 call mtr.add_suppression("Replica SQL for channel 'group_replication_recovery': Could not execute Write_rows event on table test.t1; Duplicate entry.*");
65 call mtr.add_suppression("Fatal error during the incremental recovery process of Group Replication. The server will leave the group.");
66 call mtr.add_suppression("The server was automatically set into read only mode after an error was detected.");
67 call mtr.add_suppression("Error leaving the group");
68 call mtr.add_suppression("All donors left. Aborting group replication incremental recovery.");
69 call mtr.add_suppression("The member is already leaving or joining a group.");
70 call mtr.add_suppression("Skipping leave operation: member already left the group.");
71 call mtr.add_suppression("Skipping leave operation: concurrent attempt to leave the group is on-going.");
72 SET SESSION sql_log_bin= 1;
73 [connection server3]
74 SET SESSION sql_log_bin= 0;
75 call mtr.add_suppression("On shutdown there was a timeout on the Group Replication recovery module termination. Check the log for more details");
76 call mtr.add_suppression("Replica SQL for channel 'group_replication_recovery': Could not execute Write_rows event on table test.t1; Duplicate entry.*");
77 call mtr.add_suppression("Fatal error during the incremental recovery process of Group Replication. The server will leave the group.");
78 call mtr.add_suppression("The server was automatically set into read only mode after an error was detected.");
79 call mtr.add_suppression("Error leaving the group");
80 call mtr.add_suppression("All donors left. Aborting group replication incremental recovery.");
81 call mtr.add_suppression("The member is already leaving or joining a group.");
82 call mtr.add_suppression("Skipping leave operation: member already left the group.");
83 call mtr.add_suppression("Skipping leave operation: concurrent attempt to leave the group is on-going.");
84 SET SESSION sql_log_bin= 1;
85
86 ############################################################
87 # 3. Block applier channel on member 1 so that joinining
88 # members that will recover from it will be blocked on
89 # recovery waiting for the View_change_log_event on which
90 # them joined.
91 [connection server1]
92 SET @@GLOBAL.DEBUG='+d,block_applier_updates';
93
94 ############################################################
95 # 4. Stop and start members 2 and 3 without waiting for
96 # member status.
97 [connection server2]
98 STOP GROUP_REPLICATION;
99 [connection server3]
100 STOP GROUP_REPLICATION;
101 [connection server2]
102 START GROUP_REPLICATION;
103 [connection server3]
104 START GROUP_REPLICATION;
105 [connection server2]
106 include/gr_wait_for_member_state.inc
107 [connection server3]
108 include/gr_wait_for_member_state.inc
109
110 ############################################################
111 # 5. Stop and start member 1.
112 [connection server1]
113 SET @group_replication_recovery_reconnect_interval_save= @@GLOBAL.group_replication_recovery_reconnect_interval;
114 SET GLOBAL group_replication_recovery_reconnect_interval= 1;
115 SET @group_replication_components_stop_timeout_save = @@GLOBAL.group_replication_components_stop_timeout;
116 SET GLOBAL group_replication_components_stop_timeout= 2;
117 SET DEBUG_SYNC = "now WAIT_FOR applier_read_blocked";
118 SET @@GLOBAL.DEBUG='-d,block_applier_updates';
119 SET @@GLOBAL.DEBUG='+d,force_sql_thread_error';
120 SET DEBUG_SYNC = "now SIGNAL resume_applier_read";
121 include/gr_wait_for_member_state.inc
122 SET @@GLOBAL.DEBUG='-d,force_sql_thread_error';
123 SET DEBUG_SYNC= 'RESET';
124 STOP GROUP_REPLICATION;
125 include/assert_and_disable_read_only.inc
126 ALTER EVENT e1 DISABLE;
127 SET GLOBAL EVENT_SCHEDULER= @old_event_scheduler;
128 DROP EVENT e1;
129 DROP TABLE t1;
130 RESET MASTER;
131 START GROUP_REPLICATION;
132 include/gr_wait_for_member_state.inc
133
134 ############################################################
135 # 6. Clean up.
136 [connection server1]
137 include/stop_group_replication.inc
138 SET GLOBAL group_replication_recovery_reconnect_interval= @group_replication_recovery_reconnect_interval_save;
139 SET GLOBAl group_replication_components_stop_timeout = @group_replication_components_stop_timeout_save;
140 [connection server2]
141 include/stop_group_replication.inc
142 DROP EVENT IF EXISTS e1;
143 DROP TABLE IF EXISTS t1;
144 [connection server3]
145 include/stop_group_replication.inc
146 DROP EVENT IF EXISTS e1;
147 DROP TABLE IF EXISTS t1;
148 include/group_replication_end.inc