File: gr_join_with_suspect_member.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 (132 lines) | stat: -rw-r--r-- 4,777 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
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. Create a group with 3 members and a table on it.
#
# Start GR on server1.
[connection server1]
include/start_and_bootstrap_group_replication.inc
#
# Start GR on server2.
[connection server2]
include/start_group_replication.inc
#
# Start GR on server3.
[connection server3]
include/start_group_replication.inc
#
# Create a table
[connection server1]
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
include/rpl_sync.inc
[connection server4]
set session sql_log_bin=0;
call mtr.add_suppression("Timeout on wait for view after joining group");
call mtr.add_suppression("The member is leaving a group without being on one");
call mtr.add_suppression("The member has left the group but the new view will not be installed");
set session sql_log_bin=1;

############################################################
# 2. Set group_replication_member_expel_timeout to
#    300 seconds.
[connection server1]
SET GLOBAL group_replication_member_expel_timeout = 300;
SELECT @@GLOBAL.group_replication_member_expel_timeout;
@@GLOBAL.group_replication_member_expel_timeout
300
[connection server2]
SET GLOBAL group_replication_member_expel_timeout = 300;
SELECT @@GLOBAL.group_replication_member_expel_timeout;
@@GLOBAL.group_replication_member_expel_timeout
300
[connection server3]
SET GLOBAL group_replication_member_expel_timeout = 300;
SELECT @@GLOBAL.group_replication_member_expel_timeout;
@@GLOBAL.group_replication_member_expel_timeout
300
[connection server4]
SET GLOBAL group_replication_member_expel_timeout = 300;
SELECT @@GLOBAL.group_replication_member_expel_timeout;
@@GLOBAL.group_replication_member_expel_timeout
300

############################################################
# 3. Suspend server 3 by sending signal SIGSTOP to it.
#    This will make server 3 not answer to "I am alive"
#    GCS messages and it will eventually be considered
#    faulty.
[connection server3]
#
# Get server 3 pid.
SET SESSION sql_log_bin= 0;
CREATE TABLE pid_table(pid_no INT);
LOAD DATA LOCAL INFILE 'pid_file' INTO TABLE pid_table;
DROP TABLE pid_table;
SET SESSION sql_log_bin= 1;
#
# Suspending server 3...

############################################################
# 4. Check that all members are still in the group on
#    servers 1 and 2, which should both be ONLINE.
#    Server 3 should still be in the group but UNREACHABLE.
#    After more than 10 seconds nobody left the group.
[connection server1]

############################################################
# 5. Try to make server 4 join the group will fail while
#    server 3 is UNREACHABLE.
#    Note also that server 3 is not expelled from the group.
#
# Try to start GR on server4.
[connection server4]
SET GLOBAL group_replication_group_name= "GROUP_REPLICATION_GROUP_NAME";
SET GLOBAL group_replication_group_seeds= "SERVER1_LOCAL_ADDRESS";
START GROUP_REPLICATION;
ERROR HY000: The server is not configured properly to be an active member of the group. Please see more details on error log.
[connection server1]

############################################################
# 6. Reset the group_replication_member_expel_timeout
#    parameter to 0 seconds thus forcing server 3 to be
#    expelled.
#
# Reset the group_replication_member_expel_timeout to 0.
[connection server1]
SET GLOBAL group_replication_member_expel_timeout = 0;
[connection server2]
SET GLOBAL group_replication_member_expel_timeout = 0;
[connection server4]
SET GLOBAL group_replication_member_expel_timeout = 0;
#
# Wait until server 3 is expelled and 2 servers are online
[connection server1]

#############################################################
# 7. Make server 4 successfully join the group after reseting
#    the above option.
#
# Start GR on server4
[connection server4]
include/start_group_replication.inc
#############################################################
# 8. Resume server3 and make it rejoin the group
#
[connection server3]
include/stop_group_replication.inc
include/start_group_replication.inc
#
# Wait until until all servers are online again
[connection server1]

############################################################
# 9. Clean up.
[connection server1]
DROP TABLE t1;
include/rpl_sync.inc
include/group_replication_end.inc