mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 04:22:27 +01:00
83 lines
2.6 KiB
Text
83 lines
2.6 KiB
Text
connection node_2;
|
|
connection node_1;
|
|
connection node_1;
|
|
CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
|
|
SET GLOBAL wsrep_slave_threads = 10;
|
|
# Set slave threads to 10 step 1
|
|
SELECT VARIABLE_VALUE AS EXPECT_10 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
|
|
EXPECT_10
|
|
10
|
|
SET GLOBAL wsrep_slave_threads = 1;
|
|
connection node_2;
|
|
INSERT INTO t1 VALUES (1);
|
|
connection node_1;
|
|
# Wait until one of the appliers has exited
|
|
SELECT VARIABLE_VALUE AS EXPECT_9 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
|
|
EXPECT_9
|
|
9
|
|
SET GLOBAL wsrep_slave_threads = 10;
|
|
# Set slave threads to 10 step 2
|
|
SELECT VARIABLE_VALUE AS EXPECT_10 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
|
|
EXPECT_10
|
|
10
|
|
SET GLOBAL wsrep_slave_threads = 20;
|
|
# Set slave threads to 20
|
|
SELECT VARIABLE_VALUE AS EXPECT_20 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
|
|
EXPECT_20
|
|
20
|
|
SET GLOBAL wsrep_slave_threads = 1;
|
|
connection node_2;
|
|
INSERT INTO t1 VALUES (1);
|
|
INSERT INTO t1 VALUES (2);
|
|
INSERT INTO t1 VALUES (3);
|
|
INSERT INTO t1 VALUES (4);
|
|
INSERT INTO t1 VALUES (5);
|
|
INSERT INTO t1 VALUES (6);
|
|
INSERT INTO t1 VALUES (7);
|
|
INSERT INTO t1 VALUES (8);
|
|
INSERT INTO t1 VALUES (9);
|
|
INSERT INTO t1 VALUES (10);
|
|
INSERT INTO t1 VALUES (11);
|
|
INSERT INTO t1 VALUES (12);
|
|
INSERT INTO t1 VALUES (13);
|
|
INSERT INTO t1 VALUES (14);
|
|
INSERT INTO t1 VALUES (16);
|
|
INSERT INTO t1 VALUES (17);
|
|
INSERT INTO t1 VALUES (18);
|
|
INSERT INTO t1 VALUES (19);
|
|
INSERT INTO t1 VALUES (20);
|
|
connection node_1;
|
|
# Wait until 19 of the appliers has exited
|
|
SELECT VARIABLE_VALUE AS EXPECT_1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
|
|
EXPECT_1
|
|
1
|
|
SELECT COUNT(*) FROM t1;
|
|
COUNT(*)
|
|
20
|
|
SET GLOBAL wsrep_slave_threads = 10;
|
|
# Set slave threads to 10 step 3
|
|
SELECT VARIABLE_VALUE AS EXPECT_10 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
|
|
EXPECT_10
|
|
10
|
|
connection node_1;
|
|
SET GLOBAL wsrep_slave_threads = 1;
|
|
connection node_2;
|
|
INSERT INTO t1 VALUES (21);
|
|
INSERT INTO t1 VALUES (22);
|
|
INSERT INTO t1 VALUES (23);
|
|
INSERT INTO t1 VALUES (24);
|
|
INSERT INTO t1 VALUES (25);
|
|
INSERT INTO t1 VALUES (26);
|
|
INSERT INTO t1 VALUES (27);
|
|
INSERT INTO t1 VALUES (28);
|
|
INSERT INTO t1 VALUES (29);
|
|
INSERT INTO t1 VALUES (30);
|
|
connection node_1;
|
|
# Wait until slave threads back to 1
|
|
SELECT VARIABLE_VALUE AS EXPECT_1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
|
|
EXPECT_1
|
|
1
|
|
SELECT COUNT(*) FROM t1;
|
|
COUNT(*)
|
|
30
|
|
DROP TABLE t1;
|