mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 10:14:19 +01:00
Galera MTR Tests: Test for GAL-491: Progress output for IST
This commit is contained in:
parent
5fb1260365
commit
9064263703
3 changed files with 98 additions and 0 deletions
19
mysql-test/suite/galera/r/galera_ist_progress.result
Normal file
19
mysql-test/suite/galera/r/galera_ist_progress.result
Normal file
|
@ -0,0 +1,19 @@
|
|||
SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1';
|
||||
SET SESSION wsrep_on = OFF;
|
||||
SET SESSION wsrep_on = ON;
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
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);
|
||||
SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 0';
|
||||
include/assert_grep.inc [Receiving IST: 11 writesets, seqnos]
|
||||
include/assert_grep.inc [Receiving IST\.\.\. 0\.0% \( 0/11 events\) complete]
|
||||
include/assert_grep.inc [Receiving IST\.\.\.100\.0% \(11/11 events\) complete]
|
||||
DROP TABLE t1;
|
5
mysql-test/suite/galera/t/galera_ist_progress.cnf
Normal file
5
mysql-test/suite/galera/t/galera_ist_progress.cnf
Normal file
|
@ -0,0 +1,5 @@
|
|||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
wsrep_provider_options='base_port=@mysqld.1.#galera_port;pc.ignore_sb=true'
|
||||
|
74
mysql-test/suite/galera/t/galera_ist_progress.test
Normal file
74
mysql-test/suite/galera/t/galera_ist_progress.test
Normal file
|
@ -0,0 +1,74 @@
|
|||
#
|
||||
# Test progress output during IST
|
||||
#
|
||||
|
||||
--source include/galera_cluster.inc
|
||||
|
||||
# Isolate node #2
|
||||
--connection node_2
|
||||
SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1';
|
||||
|
||||
--connection node_1
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
--connection node_2
|
||||
SET SESSION wsrep_on = OFF;
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 'non-Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
|
||||
--source include/wait_condition.inc
|
||||
SET SESSION wsrep_on = ON;
|
||||
|
||||
# Node #2 is now isolated. Run some transactions to accumulate writesets for IST
|
||||
|
||||
--connection node_1
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
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);
|
||||
|
||||
# Restore node #2, IST is performed
|
||||
|
||||
--connection node_2
|
||||
SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 0';
|
||||
|
||||
--connection node_1
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
--connection node_2
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
#
|
||||
# Grep for expected IST output in joiner log
|
||||
#
|
||||
|
||||
--connection node_1
|
||||
|
||||
--let $assert_count = 1
|
||||
--let $assert_file = $MYSQLTEST_VARDIR/log/mysqld.2.err
|
||||
--let $assert_only_after = Need state transfer
|
||||
|
||||
--let $assert_text = Receiving IST: 11 writesets, seqnos
|
||||
--let $assert_select = Receiving IST: 11 writesets, seqnos
|
||||
--source include/assert_grep.inc
|
||||
|
||||
--let $assert_text = Receiving IST\.\.\. 0\.0% \( 0/11 events\) complete
|
||||
--let $assert_select = Receiving IST\.\.\. 0\.0% \( 0/11 events\) complete
|
||||
--source include/assert_grep.inc
|
||||
|
||||
--let $assert_text = Receiving IST\.\.\.100\.0% \(11/11 events\) complete
|
||||
--let $assert_select = Receiving IST\.\.\.100\.0% \(11/11 events\) complete
|
||||
--source include/assert_grep.inc
|
||||
|
||||
# Cleanup
|
||||
|
||||
--connection node_1
|
||||
DROP TABLE t1;
|
Loading…
Add table
Reference in a new issue