Debian Codegraph @

mysql-test/suite/group_replication/r/gr_acf_error_state_handling.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
7 # 1. Start GR on M1(primary), M2 and M3
8
9 [connection server1]
10 SET SESSION sql_log_bin= 0;
11 call mtr.add_suppression("Failed to fetch Transaction_context_log_event containing required transaction info for certification");
12 call mtr.add_suppression("Fatal error during execution on the Applier process of Group Replication. The server will now leave the group.");
13 call mtr.add_suppression("Error at event handling! Got error: 1");
14 call mtr.add_suppression("The member is leaving a group without being on one");
15 call mtr.add_suppression("Due to a plugin error, some transactions were unable to be certified and will now rollback.");
16 call mtr.add_suppression("The server was automatically set into read only mode after an error was detected.");
17 call mtr.add_suppression("Error while waiting for conflict detection procedure to finish on session .*");
18 call mtr.add_suppression("Run function 'before_commit' in plugin 'group_replication' failed");
19 call mtr.add_suppression("Skipping leave operation: concurrent attempt to leave the group is on-going.");
20 SET SESSION sql_log_bin= 1;
21 CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB;
22 include/start_and_bootstrap_group_replication.inc
23 [connection server2]
24 SET sql_log_bin=0;
25 CALL mtr.add_suppression("Could not execute Write_rows event on table test.t1");
26 CALL mtr.add_suppression("The applier thread execution was aborted. Unable to process more transactions, this member will now leave the group.");
27 CALL mtr.add_suppression("Fatal error during execution on the Applier process of Group Replication. The server will now leave the group.");
28 CALL mtr.add_suppression("The server was automatically set into read only mode after an error was detected.");
29 CALL mtr.add_suppression("Skipping leave operation: concurrent attempt to leave the group is on-going.");
30 CALL mtr.add_suppression("The replica coordinator and worker threads are stopped");
31 SET sql_log_bin=1;
32 SET @member_weight2_save= @@GLOBAL.group_replication_member_weight;
33 SET GLOBAL group_replication_member_weight= 90;
34 include/start_group_replication.inc
35 [connection server3]
36 include/start_group_replication.inc
37 [connection server4]
38 SET SESSION sql_log_bin = 0;
39 call mtr.add_suppression("The source.*for channel.*has joined the group.*and so added its entry into replication_asynchronous_connection_failover table");
40 call mtr.add_suppression("The .* for channel 'ch1_4' has left the group .*, and so removed its entry from replication_asynchronous_connection_failover table.");
41 call mtr.add_suppression("The Monitor IO thread detected that the source .* does not belong to the group majority, thence the channel .* will try to connect to another source.");
42 call mtr.add_suppression("The IO thread detected that the source .* does not belong to the group majority, thence the channel .* will try to connect to another source.");
43 call mtr.add_suppression("The group .* for the channel .* has been removed, and so removed its entry from replication_asynchronous_connection_failover_managed and all the group members from replication_asynchronous_connection_failover table.");
44 call mtr.add_suppression("The group .* for the channel .* has been added, and so added its entry in replication_asynchronous_connection_failover_managed and source to replication_asynchronous_connection_failover table.");
45 SET SESSION sql_log_bin = 1;
46
47 # 2. Add asynchronous connection failover servers and
48 # verify that they are inserted successfully in
49 # performance_schema.replication_asynchronous_connection_failover.
50
51 [connection server1]
52 [connection server4]
53 SELECT asynchronous_connection_failover_add_managed('ch1_4', 'GroupReplication', 'GROUP_NAME', '127.0.0.1', SERVER_MYPORT_1, '', 70, 60);;
54 asynchronous_connection_failover_add_managed('ch1_4', 'GroupReplication', 'GROUP_NAME', '127.0.0.1', SERVER_MYPORT_1, '', 70, 60)
55 The UDF asynchronous_connection_failover_add_managed() executed successfully.
56 include/assert.inc ['There is one row in performance_schema.replication_asynchronous_connection_failover']
57
58 # 3. Create and start new channel ch1_4: M4(replica), M1(source)
59 # and verify channel ch1_4 IO and SQL THREADS are ON.
60
61 [connection server4]
62 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_1_PORT, SOURCE_CONNECT_RETRY=1, SOURCE_RETRY_COUNT=2 for channel 'ch1_4';
63 Warnings:
64 Note 1759 Sending passwords in plain text without SSL/TLS is extremely insecure.
65 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.
66 include/start_slave.inc [FOR CHANNEL 'ch1_4']
67 include/assert.inc [Verify channel ch1_4 IO_THREAD is ON]
68 include/assert.inc [Verify channel ch1_4 SQL_THREAD is ON]
69
70 # 4. Verify 3 senders are added automatically to
71 # replication_asynchronous_connection_failover table.
72
73 [connection server4]
74 include/assert.inc ['Connected to server1 now.']
75
76 # 5. Put M2(secondary) in error state.
77
78 [connection server2]
79 SET SESSION sql_log_bin= 0;
80 SET GLOBAL read_only= FALSE;
81 INSERT INTO t1 VALUES (1);
82 SET GLOBAL read_only= TRUE;
83 SET SESSION sql_log_bin= 1;
84 [connection server1]
85 INSERT INTO t1 VALUES (1);
86 [connection server2]
87 include/gr_wait_for_member_state.inc
88
89 # 6. Verify M2 is not present in
90 # performance_schema.replication_asynchronous_connection_failover
91
92 [connection server4]
93 include/assert.inc ['Connected to server1.']
94
95 # 7. Bring M2 back ONLINE.
96
97 [connection server2]
98 include/stop_group_replication.inc
99 SET SESSION sql_log_bin= 0;
100 SET GLOBAL read_only= FALSE;
101 DELETE FROM t1;
102 SET GLOBAL read_only= TRUE;
103 SET SESSION sql_log_bin= 1;
104 include/start_group_replication.inc
105 [connection server4]
106
107 # 8. Put M1(primary) in error state.
108
109 [connection server1]
110 SET @@GLOBAL.DEBUG= '+d,certification_handler_force_error_on_pipeline';
111 INSERT INTO t1 VALUES (2);
112 Got one of the listed errors
113 include/gr_wait_for_member_state.inc
114
115 # 9. Verify M1 is not present in
116 # performance_schema.replication_asynchronous_connection_failover
117 # Verify M2 is new source.
118
119 [connection server4]
120 include/assert_grep.inc [Source removed message is logged.]
121
122 # 10. Cleanup.
123
124 [connection server2]
125 SET GLOBAL group_replication_member_weight= @member_weight2_save;
126 DROP TABLE t1;
127 [connection server1]
128 SET @@GLOBAL.DEBUG= '-d,certification_handler_force_error_on_pipeline';
129 include/stop_group_replication.inc
130 include/start_group_replication.inc
131 SELECT group_replication_set_as_primary("MEMBER1_UUID");
132 group_replication_set_as_primary("MEMBER1_UUID")
133 Primary server switched to: MEMBER1_UUID
134 [connection server4]
135 [connection server1]
136 include/sync_slave_sql_with_master.inc
137 [connection server4]
138 include/stop_slave.inc [FOR CHANNEL 'ch1_4']
139 include/rpl_reset_slave.inc
140 SELECT asynchronous_connection_failover_delete_managed('ch1_4', 'GROUP_NAME');
141 asynchronous_connection_failover_delete_managed('ch1_4', 'GROUP_NAME')
142 The UDF asynchronous_connection_failover_delete_managed() executed successfully.
143 include/group_replication_end.inc