Debian Codegraph @

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

raw
1
2 ############################################################
3 # 1. Create a group with 4 members and a table on it.
4 include/group_replication.inc [rpl_server_count=4]
5 Warnings:
6 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
7 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.
8 [connection server1]
9 [connection server1]
10 #
11 # Create a table
12 [connection server1]
13 CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB;
14 INSERT INTO t1 VALUES (1);
15 include/rpl_sync.inc
16 [connection server4]
17 set session sql_log_bin=0;
18 call mtr.add_suppression("Timeout on wait for view after joining group");
19 call mtr.add_suppression("The member is leaving a group without being on one");
20 call mtr.add_suppression("The member has left the group but the new view will not be installed");
21 set session sql_log_bin=1;
22
23 ############################################################
24 # 2. Set group_replication_member_expel_timeout to
25 # 300 seconds.
26 [connection server1]
27 SET GLOBAL group_replication_member_expel_timeout = 300;
28 SELECT @@GLOBAL.group_replication_member_expel_timeout;
29 @@GLOBAL.group_replication_member_expel_timeout
30 300
31 [connection server2]
32 SET GLOBAL group_replication_member_expel_timeout = 300;
33 SELECT @@GLOBAL.group_replication_member_expel_timeout;
34 @@GLOBAL.group_replication_member_expel_timeout
35 300
36 [connection server3]
37 SET GLOBAL group_replication_member_expel_timeout = 300;
38 SELECT @@GLOBAL.group_replication_member_expel_timeout;
39 @@GLOBAL.group_replication_member_expel_timeout
40 300
41 [connection server4]
42 SET GLOBAL group_replication_member_expel_timeout = 300;
43 SELECT @@GLOBAL.group_replication_member_expel_timeout;
44 @@GLOBAL.group_replication_member_expel_timeout
45 300
46
47 ############################################################
48 # 3. Suspend server 3 by sending signal SIGSTOP to it.
49 # This will make server 3 not answer to "I am alive"
50 # GCS messages and it will eventually be considered
51 # faulty.
52 [connection server3]
53 #
54 # Get server 3 pid.
55 SET SESSION sql_log_bin= 0;
56 CREATE TABLE pid_table(pid_no INT);
57 LOAD DATA LOCAL INFILE 'pid_file' INTO TABLE pid_table;
58 DROP TABLE pid_table;
59 SET SESSION sql_log_bin= 1;
60 #
61 # Suspending server 3...
62
63 ############################################################
64 # 4. Check that all members are still in the group on
65 # servers 1, 2 and 4 which should be ONLINE.
66 # Server 3 should still be in the group but UNREACHABLE.
67 [connection server1]
68
69 ############################################################
70 # 5. Make server 4 leave the group and notice that it is
71 # reported as ONLINE and server 3 as UNREACHABLE.
72 #
73 # Stop GR on server4.
74 [connection server4]
75 include/stop_group_replication.inc
76 [connection server1]
77
78 ############################################################
79 # 6. Reset the group_replication_member_expel_timeout
80 # parameter to 0 seconds thus forcing server 3 to be
81 # expelled.
82 #
83 # Reset the group_replication_member_expel_timeout to 0.
84 [connection server1]
85 SET GLOBAL group_replication_member_expel_timeout = 0;
86 [connection server2]
87 SET GLOBAL group_replication_member_expel_timeout = 0;
88 [connection server4]
89 SET GLOBAL group_replication_member_expel_timeout = 0;
90 #
91 # Wait until until server 3 is expelled and 2 servers are online
92 [connection server1]
93
94 #############################################################
95 # 7. Make server 4 successfully join the group after reseting
96 # the above option.
97 #
98 # Start GR on server4
99 [connection server4]
100 SET GLOBAL group_replication_group_seeds= "SERVER1_LOCAL_ADDRESS";
101 include/start_group_replication.inc
102 #############################################################
103 # 8. Resume server 3 and make it rejoin the group
104 #
105 [connection server3]
106 include/stop_group_replication.inc
107 include/start_group_replication.inc
108 #
109 # Wait until until all servers are online again
110 [connection server1]
111
112 ############################################################
113 # 9. Clean up.
114 [connection server1]
115 DROP TABLE t1;
116 include/rpl_sync.inc
117 include/group_replication_end.inc