File: gr_write_concurrency.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 (126 lines) | stat: -rw-r--r-- 8,201 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
include/group_replication.inc [rpl_server_count=2]
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]
CREATE TABLE t1 (i INT, v INT, PRIMARY KEY (i));
INSERT INTO t1 VALUES (1, NULL);
INSERT INTO t1 VALUES (2, 9);
INSERT INTO t1 VALUES (3, 42);
INSERT INTO t1 VALUES (4, 201);
###############################################################################
# 2. Confirm default value on M1, M2
[connection server1]
include/assert.inc [write_concurrency is supposed to be 10 by default]
include/assert.inc [write_concurrency (10) should be 10]
[connection server2]
SET SESSION sql_log_bin = 0;
call mtr.add_suppression("Could not execute Write_rows event on table test.t2; Duplicate entry '11'*");
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(".*Replica SQL for channel 'group_replication_applier': ... The replica coordinator and worker threads are stopped, possibly leaving data in inconsistent state*");
SET SESSION sql_log_bin = 1;
include/assert.inc [write_concurrency is supposed to be 10 by default]
include/assert.inc [write_concurrency (10) should be 10]
###############################################################################
# 3. Increase write_concurrency via M1, confirm on M1, M2
[connection server1]
SELECT group_replication_set_write_concurrency(42);
group_replication_set_write_concurrency(42)
UDF is asynchronous, check log or call group_replication_get_write_concurrency().
include/assert.inc [write_concurrency (42) should be 42]
[connection server2]
include/assert.inc [write_concurrency (42) should be 42]
###############################################################################
# 4. Decrease write_concurrency via M2, confirm on M1, M2
SELECT group_replication_set_write_concurrency(10);
group_replication_set_write_concurrency(10)
UDF is asynchronous, check log or call group_replication_get_write_concurrency().
include/assert.inc [write_concurrency (10) should be 10]
[connection server1]
include/assert.inc [write_concurrency (10) should be 10]
###############################################################################
# 5. Confirm invalid calls to group_replication_get_write_concurrency
SELECT group_replication_get_write_concurrency(1);
ERROR HY000: Can't initialize function 'group_replication_get_write_concurrency'; UDF does not take arguments.
SELECT group_replication_get_write_concurrency(1.1);
ERROR HY000: Can't initialize function 'group_replication_get_write_concurrency'; UDF does not take arguments.
SELECT group_replication_get_write_concurrency("hehe");
ERROR HY000: Can't initialize function 'group_replication_get_write_concurrency'; UDF does not take arguments.
SELECT group_replication_get_write_concurrency(NULL);
ERROR HY000: Can't initialize function 'group_replication_get_write_concurrency'; UDF does not take arguments.
###############################################################################
# 6. Confirm invalid calls to group_replication_set_write_concurrency
SELECT group_replication_set_write_concurrency();
ERROR HY000: Can't initialize function 'group_replication_set_write_concurrency'; UDF takes one integer argument.
SELECT group_replication_set_write_concurrency(NULL);
ERROR HY000: Can't initialize function 'group_replication_set_write_concurrency'; UDF takes one integer argument.
SELECT group_replication_set_write_concurrency(1.1);
ERROR HY000: Can't initialize function 'group_replication_set_write_concurrency'; UDF takes one integer argument.
SELECT group_replication_set_write_concurrency("hehe");
ERROR HY000: Can't initialize function 'group_replication_set_write_concurrency'; UDF takes one integer argument.
SELECT group_replication_set_write_concurrency(9);
ERROR HY000: Can't initialize function 'group_replication_set_write_concurrency'; Argument must be between 10 and 200.
SELECT group_replication_set_write_concurrency(4097);
ERROR HY000: Can't initialize function 'group_replication_set_write_concurrency'; Argument must be between 10 and 200.
SELECT group_replication_set_write_concurrency(v) FROM test.t1 WHERE i=1;
ERROR HY000: The function 'group_replication_set_write_concurrency' failed. UDF takes one integer argument.
SELECT group_replication_set_write_concurrency(v) FROM test.t1 WHERE i=2;
ERROR HY000: The function 'group_replication_set_write_concurrency' failed. Argument must be between 10 and 200.
SELECT group_replication_set_write_concurrency(v) FROM test.t1 WHERE i=3;
group_replication_set_write_concurrency(v)
UDF is asynchronous, check log or call group_replication_get_write_concurrency().
SELECT group_replication_set_write_concurrency(v) FROM test.t1 WHERE i=4;
ERROR HY000: The function 'group_replication_set_write_concurrency' failed. Argument must be between 10 and 200.
[connection server2]
include/stop_group_replication.inc
###############################################################################
# 7. Check that it is not possible to modify/query write_concurrency value when server is in RECOVERING state.
[connection server2]
SET @@GLOBAL.DEBUG='+d,recovery_thread_wait_before_finish';
include/start_group_replication.inc
SELECT group_replication_set_write_concurrency(111);
ERROR HY000: Can't initialize function 'group_replication_set_write_concurrency'; Member must be ONLINE and in the majority partition.
SELECT group_replication_get_write_concurrency();
ERROR HY000: Can't initialize function 'group_replication_get_write_concurrency'; Member must be ONLINE and in the majority partition.
###############################################################################
# 8. Check that it is not possible to update wc value when a member is in ERROR state.
[connection server2]
SET DEBUG_SYNC= "now WAIT_FOR signal.recovery_thread_wait_before_finish_reached";
SET @@GLOBAL.DEBUG='-d,recovery_thread_wait_before_finish';
SET DEBUG_SYNC= "now SIGNAL signal.recovery_end";
Wait until server2 becomes ONLINE
include/gr_wait_for_member_state.inc
SET DEBUG_SYNC= 'RESET';
CREATE TABLE t2 (a INT PRIMARY KEY);
include/rpl_sync.inc
[connection server2]
SET SESSION sql_log_bin=0;
INSERT INTO t2 values(11);
SET SESSION sql_log_bin=1;
[connection server1]
INSERT INTO t2 values(11);
[connection server2]
wait until server2 goes to ERROR state.
SELECT group_replication_set_write_concurrency(11);
ERROR HY000: Can't initialize function 'group_replication_set_write_concurrency'; Member must be ONLINE and in the majority partition.
SELECT group_replication_get_write_concurrency();
ERROR HY000: Can't initialize function 'group_replication_get_write_concurrency'; Member must be ONLINE and in the majority partition.
include/stop_group_replication.inc
SET SESSION sql_log_bin=0;
DELETE FROM t2;
SET SESSION sql_log_bin=1;
include/start_group_replication.inc
DROP TABLE t1;
DROP TABLE t2;
include/rpl_sync.inc
###############################################################################
# 9. Stop GR and try to call group_replication_{get,set}_write_concurrency outside of a group
[connection server1]
include/group_replication_end.inc
SELECT group_replication_get_write_concurrency();
ERROR HY000: Can't initialize function 'group_replication_get_write_concurrency'; Member must be ONLINE and in the majority partition.
SELECT group_replication_set_write_concurrency(10);
ERROR HY000: Can't initialize function 'group_replication_set_write_concurrency'; Member must be ONLINE and in the majority partition.