File: gr_acf_error_state_handling.result

package info (click to toggle)
mysql-8.0 8.0.43-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,273,924 kB
  • sloc: cpp: 4,684,605; ansic: 412,450; pascal: 108,398; java: 83,641; perl: 30,221; cs: 27,067; sql: 26,594; sh: 24,181; python: 21,816; yacc: 17,169; php: 11,522; xml: 7,388; javascript: 7,076; makefile: 2,194; lex: 1,075; awk: 670; asm: 520; objc: 183; ruby: 97; lisp: 86
file content (143 lines) | stat: -rw-r--r-- 7,630 bytes parent folder | download
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
138
139
140
141
142
143
include/group_replication.inc [rpl_server_count=4]
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. Start GR on M1(primary), M2 and M3

[connection server1]
SET SESSION sql_log_bin= 0;
call mtr.add_suppression("Failed to fetch Transaction_context_log_event containing required transaction info for certification");
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("Error at event handling! Got error: 1");
call mtr.add_suppression("The member is leaving a group without being on one");
call mtr.add_suppression("Due to a plugin error, some transactions were unable to be certified and will now rollback.");
call mtr.add_suppression("The server was automatically set into read only mode after an error was detected.");
call mtr.add_suppression("Error while waiting for conflict detection procedure to finish on session .*");
call mtr.add_suppression("Run function 'before_commit' in plugin 'group_replication' failed");
call mtr.add_suppression("Skipping leave operation: concurrent attempt to leave the group is on-going.");
SET SESSION sql_log_bin= 1;
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB;
include/start_and_bootstrap_group_replication.inc
[connection server2]
SET sql_log_bin=0;
CALL mtr.add_suppression("Could not execute Write_rows event on table test.t1");
CALL mtr.add_suppression("The applier thread execution was aborted. Unable to process more transactions, this member will now leave the group.");
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("The server was automatically set into read only mode after an error was detected.");
CALL mtr.add_suppression("Skipping leave operation: concurrent attempt to leave the group is on-going.");
CALL mtr.add_suppression("The replica coordinator and worker threads are stopped");
SET sql_log_bin=1;
SET @member_weight2_save= @@GLOBAL.group_replication_member_weight;
SET GLOBAL group_replication_member_weight= 90;
include/start_group_replication.inc
[connection server3]
include/start_group_replication.inc
[connection server4]
SET SESSION sql_log_bin = 0;
call mtr.add_suppression("The source.*for channel.*has joined the group.*and so added its entry into replication_asynchronous_connection_failover table");
call mtr.add_suppression("The .* for channel 'ch1_4' has left the group .*, and so removed its entry from replication_asynchronous_connection_failover table.");
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.");
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.");
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.");
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.");
SET SESSION sql_log_bin = 1;

# 2. Add asynchronous connection failover servers and
#    verify that they are inserted successfully in
#    performance_schema.replication_asynchronous_connection_failover.

[connection server1]
[connection server4]
SELECT asynchronous_connection_failover_add_managed('ch1_4', 'GroupReplication', 'GROUP_NAME', '127.0.0.1', SERVER_MYPORT_1, '', 70, 60);;
asynchronous_connection_failover_add_managed('ch1_4', 'GroupReplication', 'GROUP_NAME', '127.0.0.1', SERVER_MYPORT_1, '', 70, 60)
The UDF asynchronous_connection_failover_add_managed() executed successfully.
include/assert.inc ['There is one row in performance_schema.replication_asynchronous_connection_failover']

# 3. Create and start new channel ch1_4: M4(replica), M1(source)
#    and verify channel ch1_4 IO and SQL THREADS are ON.

[connection server4]
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';
Warnings:
Note	1759	Sending passwords in plain text without SSL/TLS is extremely insecure.
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.
include/start_slave.inc [FOR CHANNEL 'ch1_4']
include/assert.inc [Verify channel ch1_4 IO_THREAD is ON]
include/assert.inc [Verify channel ch1_4 SQL_THREAD is ON]

# 4. Verify 3 senders are added automatically to
#    replication_asynchronous_connection_failover table.

[connection server4]
include/assert.inc ['Connected to server1 now.']

# 5. Put M2(secondary) in error state.

[connection server2]
SET SESSION sql_log_bin= 0;
SET GLOBAL read_only= FALSE;
INSERT INTO t1 VALUES (1);
SET GLOBAL read_only= TRUE;
SET SESSION sql_log_bin= 1;
[connection server1]
INSERT INTO t1 VALUES (1);
[connection server2]
include/gr_wait_for_member_state.inc

# 6. Verify M2 is not present in
#    performance_schema.replication_asynchronous_connection_failover

[connection server4]
include/assert.inc ['Connected to server1.']

# 7. Bring M2 back ONLINE.

[connection server2]
include/stop_group_replication.inc
SET SESSION sql_log_bin= 0;
SET GLOBAL read_only= FALSE;
DELETE FROM t1;
SET GLOBAL read_only= TRUE;
SET SESSION sql_log_bin= 1;
include/start_group_replication.inc
[connection server4]

# 8. Put M1(primary) in error state.

[connection server1]
SET @@GLOBAL.DEBUG= '+d,certification_handler_force_error_on_pipeline';
INSERT INTO t1 VALUES (2);
Got one of the listed errors
include/gr_wait_for_member_state.inc

# 9. Verify M1 is not present in
#    performance_schema.replication_asynchronous_connection_failover
#    Verify M2 is new source.

[connection server4]
include/assert_grep.inc [Source removed message is logged.]

# 10. Cleanup.

[connection server2]
SET GLOBAL group_replication_member_weight= @member_weight2_save;
DROP TABLE t1;
[connection server1]
SET @@GLOBAL.DEBUG= '-d,certification_handler_force_error_on_pipeline';
include/stop_group_replication.inc
include/start_group_replication.inc
SELECT group_replication_set_as_primary("MEMBER1_UUID");
group_replication_set_as_primary("MEMBER1_UUID")
Primary server switched to: MEMBER1_UUID
[connection server4]
[connection server1]
include/sync_slave_sql_with_master.inc
[connection server4]
include/stop_slave.inc [FOR CHANNEL 'ch1_4']
include/rpl_reset_slave.inc
SELECT asynchronous_connection_failover_delete_managed('ch1_4', 'GROUP_NAME');
asynchronous_connection_failover_delete_managed('ch1_4', 'GROUP_NAME')
The UDF asynchronous_connection_failover_delete_managed() executed successfully.
include/group_replication_end.inc