Debian Codegraph @

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