diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2022-04-29 09:49:14 +0300 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2022-04-29 10:08:48 +0300 |
commit | 533b5faef1fe6c6d6e2747deadf4e8d4601af7e2 (patch) | |
tree | bb8b13e091688ccb956f666b47e3afc2ca26427f | |
parent | af810407f78b7f792a9bb8c47c8c532eb3b3a758 (diff) | |
download | mariadb-git-bb-10.4-MDEV-24688.tar.gz |
MDEV-24688 : galera.galera_ist_progress MTR failed: assert_grep.inc failedbb-10.4-MDEV-24688
Grep is not safe as it will confuse if there is more than one
matching line or if progress report is slightly different as
progress reporting is afected by how fast IST is send/received.
Fix is to use sed and we are interested only that there is at
least one progress report from IST.
-rw-r--r-- | mysql-test/suite/galera/r/galera_ist_progress.result | 7 | ||||
-rw-r--r-- | mysql-test/suite/galera/t/galera_ist_progress.cnf | 2 | ||||
-rw-r--r-- | mysql-test/suite/galera/t/galera_ist_progress.test | 28 |
3 files changed, 13 insertions, 24 deletions
diff --git a/mysql-test/suite/galera/r/galera_ist_progress.result b/mysql-test/suite/galera/r/galera_ist_progress.result index 9233d95b970..16772271b72 100644 --- a/mysql-test/suite/galera/r/galera_ist_progress.result +++ b/mysql-test/suite/galera/r/galera_ist_progress.result @@ -7,7 +7,7 @@ connection node_2; SET SESSION wsrep_on = OFF; SET SESSION wsrep_on = ON; connection node_1; -CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; +CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB; INSERT INTO t1 VALUES (1); INSERT INTO t1 VALUES (2); INSERT INTO t1 VALUES (3); @@ -23,8 +23,7 @@ SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 0'; connection node_1; connection node_2; connection node_1; -include/assert_grep.inc [Receiving IST: 13 writesets, seqnos 3-15] -include/assert_grep.inc [Receiving IST\.\.\. 0\.0% \( 0/13 events\) complete] -include/assert_grep.inc [Receiving IST\.\.\.100\.0% \(13/13 events\) complete] +"Trying to find IST progress reporting" +found connection node_1; DROP TABLE t1; diff --git a/mysql-test/suite/galera/t/galera_ist_progress.cnf b/mysql-test/suite/galera/t/galera_ist_progress.cnf index 0a26f6d6c83..b37e7f38ce3 100644 --- a/mysql-test/suite/galera/t/galera_ist_progress.cnf +++ b/mysql-test/suite/galera/t/galera_ist_progress.cnf @@ -3,3 +3,5 @@ [mysqld.1] wsrep_provider_options='base_port=@mysqld.1.#galera_port;pc.ignore_sb=true' + + diff --git a/mysql-test/suite/galera/t/galera_ist_progress.test b/mysql-test/suite/galera/t/galera_ist_progress.test index 3d7c53bd1eb..60034ec0db1 100644 --- a/mysql-test/suite/galera/t/galera_ist_progress.test +++ b/mysql-test/suite/galera/t/galera_ist_progress.test @@ -3,12 +3,11 @@ # --source include/galera_cluster.inc -# This could cause out of storage if run /dev/shm ---source include/big_test.inc ---source include/force_restart.inc # Isolate node #2 --connection node_2 +--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +--source include/wait_condition.inc SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1'; --connection node_1 @@ -24,7 +23,7 @@ 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; +CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB; INSERT INTO t1 VALUES (1); INSERT INTO t1 VALUES (2); INSERT INTO t1 VALUES (3); @@ -50,26 +49,15 @@ SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 0'; --source include/wait_condition.inc # -# Grep for expected IST output in joiner log +# sed 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: 13 writesets, seqnos 3-15 ---let $assert_select = Receiving IST: 13 writesets, seqnos 3-15 ---source include/assert_grep.inc - ---let $assert_text = Receiving IST\.\.\. 0\.0% \( 0/13 events\) complete ---let $assert_select = Receiving IST\.\.\. 0\.0% \( 0/13 events\) complete ---source include/assert_grep.inc - ---let $assert_text = Receiving IST\.\.\.100\.0% \(13/13 events\) complete ---let $assert_select = Receiving IST\.\.\.100\.0% \(13/13 events\) complete ---source include/assert_grep.inc +# Grep is not safe always and we are interested that there is at least one progress report (there can be more) +let $MYSQLD_DATADIR= `SELECT @@datadir`; +--echo "Trying to find IST progress reporting" +--exec sed -ne 's/.*Receiving IST.*/found/p' $MYSQLD_DATADIR/../../log/mysqld.2.err | tail -1 # Cleanup |