Debian Codegraph @

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

raw
1 include/group_replication.inc [rpl_server_count=3]
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 ############################################################
8 # 1. Set group_replication_member_expel_timeout to
9 # 5 seconds.
10 [connection server1]
11 SET GLOBAL group_replication_member_expel_timeout = 5;
12 SELECT @@GLOBAL.group_replication_member_expel_timeout;
13 @@GLOBAL.group_replication_member_expel_timeout
14 5
15 [connection server2]
16 SET GLOBAL group_replication_member_expel_timeout = 5;
17 SELECT @@GLOBAL.group_replication_member_expel_timeout;
18 @@GLOBAL.group_replication_member_expel_timeout
19 5
20 [connection server3]
21 SET GLOBAL group_replication_member_expel_timeout = 5;
22 SELECT @@GLOBAL.group_replication_member_expel_timeout;
23 @@GLOBAL.group_replication_member_expel_timeout
24 5
25 SET SESSION sql_log_bin = 0;
26 call mtr.add_suppression("Member was expelled from the group due to network failures, changing member status to ERROR.");
27 call mtr.add_suppression("The server was automatically set into read only mode after an error was detected.");
28 call mtr.add_suppression("\\[GCS\\] read failed");
29 call mtr.add_suppression("\\[GCS\\] Unable to resolve peer address");
30 SET SESSION sql_log_bin = 1;
31
32 ############################################################
33 # 2. Create a table and insert some data. Check that
34 # it is replicated to all servers.
35 [connection server1]
36 CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY);
37 INSERT INTO t1 VALUES (1);
38 include/rpl_sync.inc
39
40 ############################################################
41 # 3. Suspend server 3 by sending signal SIGSTOP to it.
42 # This will make server 3 not answer to "I am alive"
43 # GCS messages and it will eventually be considered
44 # faulty.
45 [connection server3]
46 # Get server 3 pid.
47 SET SESSION sql_log_bin= 0;
48 CREATE TABLE pid_table(pid_no INT);
49 LOAD DATA LOCAL INFILE 'pid_file' INTO TABLE pid_table;
50 DROP TABLE pid_table;
51 SET SESSION sql_log_bin= 1;
52 # Suspending server 3...
53
54 ############################################################
55 # 4. Check that all members are still in the group on
56 # servers 1 and 2, which should both be ONLINE.
57 # Server 3 should still be in the group but UNREACHABLE.
58 [connection server1]
59 [connection server2]
60
61 ############################################################
62 # 5. After some time, server 3 should have been expelled
63 # from the group.
64 [connection server1]
65 [connection server2]
66
67 ############################################################
68 # 6. Insert data into table t1 on server 2 and check that
69 # it is replicated to server 1.
70 [connection server2]
71 INSERT INTO t1 VALUES (2);
72 [connection server1]
73
74 ############################################################
75 # 7. Resume server 3 by sending a signal SIGCONT to it.
76 # Server 3 should change to ERROR state.
77 [connection server3]
78 # Send signal SIGCONT to server 3.
79 #
80 # Check that the returning member enters the error state since it was
81 # expelled from the group.
82 [connection server3]
83 #
84 # Check that the 2 remaining members are alive and online in the group
85 [connection server1]
86 [connection server2]
87
88 ############################################################
89 # 8. Restart GR on server 3
90 [connection server3]
91 include/stop_group_replication.inc
92 include/start_group_replication.inc
93
94 ############################################################
95 # 9. Server 3 should be back in the group
96 [connection server1]
97 [connection server2]
98 [connection server3]
99
100 ############################################################
101 # 10.Check that server 3 retrieves the data inserted by
102 # server 2 while it was suspended. Then, insert new
103 # data into table t1 which should be replicated to
104 # servers 1 and 2.
105 [connection server3]
106 INSERT INTO t1 VALUES (3);
107 include/rpl_sync.inc
108 include/diff_tables.inc [server1:t1, server2:t1, server3:t1]
109
110 ############################################################
111 # 11.Clean up.
112 DROP TABLE t1;
113 include/group_replication_end.inc