Commit 579c1a8c authored by Jan Lindström's avatar Jan Lindström

MDEV-17061: Test failure on galera.galera_gcs_fc_limit

Remove unnecessary sleeps and fix wait_condition to use
wsrep_flow_control_paused i.e. we wait until flow control
pauses a transaction on master.
parent 70a5fb49
...@@ -27,7 +27,6 @@ galera_binlog_rows_query_log_events: MariaDB does not support binlog_rows_query_ ...@@ -27,7 +27,6 @@ galera_binlog_rows_query_log_events: MariaDB does not support binlog_rows_query_
galera_binlog_stmt_autoinc : MDEV-13549 auto_increment mismatch galera_binlog_stmt_autoinc : MDEV-13549 auto_increment mismatch
galera_flush : MariaDB does not have global.thread_statistics galera_flush : MariaDB does not have global.thread_statistics
galera_gcache_recover_manytrx : MDEV-18834 Galera test failure galera_gcache_recover_manytrx : MDEV-18834 Galera test failure
galera_gcs_fc_limit : MDEV-17061 Timeout in wait_condition.inc for PROCESSLIST
galera_ist_mariabackup : MDEV-18829 test leaves port open galera_ist_mariabackup : MDEV-18829 test leaves port open
galera_ist_progress: MDEV-15236 fails when trying to read transfer status galera_ist_progress: MDEV-15236 fails when trying to read transfer status
galera_kill_applier : race condition at the start of the test galera_kill_applier : race condition at the start of the test
......
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT,B INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1); INSERT INTO t1 VALUES (1,1);
SELECT COUNT(*) = 1 FROM t1; SET SESSION wsrep_sync_wait=15;
COUNT(*) = 1 SELECT COUNT(*) FROM t1;
COUNT(*)
1 1
SET GLOBAL wsrep_provider_options = 'gcs.fc_limit=1'; SET GLOBAL wsrep_provider_options = 'gcs.fc_limit=1';
LOCK TABLE t1 WRITE; LOCK TABLE t1 WRITE;
INSERT INTO t1 VALUES (2); FLUSH STATUS;
INSERT INTO t1 VALUES (3); INSERT INTO t1 VALUES (2,2);
INSERT INTO t1 VALUES (4); INSERT INTO t1 VALUES (3,3);
INSERT INTO t1 VALUES (5); INSERT INTO t1 VALUES (4,4);
INSERT INTO t1(B) SELECT B FROM t1;
# In node_1 either insert or commit should be stuck
UNLOCK TABLES; UNLOCK TABLES;
INSERT INTO t1 VALUES (6); INSERT INTO t1 VALUES (NULL,6);
SELECT COUNT(*) = 6 FROM t1; SELECT COUNT(*) FROM t1;
COUNT(*) = 6 COUNT(*)
1 9
DROP TABLE t1; DROP TABLE t1;
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
--source include/galera_cluster.inc --source include/galera_cluster.inc
--source include/have_innodb.inc --source include/have_innodb.inc
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT,B INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1); INSERT INTO t1 VALUES (1,1);
--connection node_2 --connection node_2
SELECT COUNT(*) = 1 FROM t1; SET SESSION wsrep_sync_wait=15;
--sleep 1 SELECT COUNT(*) FROM t1;
--let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options` --let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options`
SET GLOBAL wsrep_provider_options = 'gcs.fc_limit=1'; SET GLOBAL wsrep_provider_options = 'gcs.fc_limit=1';
...@@ -19,24 +19,22 @@ SET GLOBAL wsrep_provider_options = 'gcs.fc_limit=1'; ...@@ -19,24 +19,22 @@ SET GLOBAL wsrep_provider_options = 'gcs.fc_limit=1';
LOCK TABLE t1 WRITE; LOCK TABLE t1 WRITE;
--connection node_1 --connection node_1
--sleep 1 FLUSH STATUS;
INSERT INTO t1 VALUES (2); INSERT INTO t1 VALUES (2,2);
--sleep 2 INSERT INTO t1 VALUES (3,3);
INSERT INTO t1 VALUES (3); INSERT INTO t1 VALUES (4,4);
--sleep 2
INSERT INTO t1 VALUES (4);
--sleep 2
# This query will hang because flow control will kick in # This query will hang because flow control will kick in
--send --send
INSERT INTO t1 VALUES (5); INSERT INTO t1(B) SELECT B FROM t1;
--sleep 2
--let $galera_connection_name = node_1a --let $galera_connection_name = node_1a
--let $galera_server_number = 1 --let $galera_server_number = 1
--source include/galera_connect.inc --source include/galera_connect.inc
--connection node_1a --connection node_1a
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'query end' AND INFO = 'INSERT INTO t1 VALUES (5)';
--echo # In node_1 either insert or commit should be stuck
--let $wait_condition = SELECT VARIABLE_VALUE > 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_flow_control_paused';
--source include/wait_condition.inc --source include/wait_condition.inc
--connection node_2 --connection node_2
...@@ -46,11 +44,11 @@ UNLOCK TABLES; ...@@ -46,11 +44,11 @@ UNLOCK TABLES;
--connection node_1 --connection node_1
--reap --reap
INSERT INTO t1 VALUES (6); INSERT INTO t1 VALUES (NULL,6);
--connection node_2 --connection node_2
# Replication catches up and continues normally # Replication catches up and continues normally
SELECT COUNT(*) = 6 FROM t1; SELECT COUNT(*) FROM t1;
--disable_query_log --disable_query_log
--eval SET GLOBAL wsrep_provider_options = '$wsrep_provider_options_orig'; --eval SET GLOBAL wsrep_provider_options = '$wsrep_provider_options_orig';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment