Commit 1bf6c42b authored by Julius Goryavsky's avatar Julius Goryavsky

MDEV-34998 addendum: post-fix corrections for SST scripts

Delaying scripts on joiner after SST/IST has been made
a common debug feature for all suitable SST/IST methods.

Also some minor fixes have been made for new tests.
parent 74bd3572
...@@ -2,6 +2,7 @@ connection node_4; ...@@ -2,6 +2,7 @@ connection node_4;
connection node_3; connection node_3;
connection node_2; connection node_2;
connection node_1; connection node_1;
# Correct Galera library found
connection node_1; connection node_1;
connection node_2; connection node_2;
connection node_3; connection node_3;
...@@ -103,7 +104,7 @@ expect4_1 ...@@ -103,7 +104,7 @@ expect4_1
DROP TABLE t1; DROP TABLE t1;
DROP TABLE t2; DROP TABLE t2;
DROP PROCEDURE p1; DROP PROCEDURE p1;
CALL mtr.add_suppression("BF applier failed to open_and_lock_tables: 1146"); CALL mtr.add_suppression("BF applier thread=.* failed to open_and_lock_tables for Table ");
CALL mtr.add_suppression("Event 3 Write_rows_v1 apply failed: 1146"); CALL mtr.add_suppression("Event 3 Write_rows_v1 apply failed: 1146");
CALL mtr.add_suppression("Inconsistency detected: Failed on preordered"); CALL mtr.add_suppression("Inconsistency detected: Failed on preordered");
CALL mtr.add_suppression("Failed to apply write set"); CALL mtr.add_suppression("Failed to apply write set");
...@@ -2,6 +2,7 @@ connection node_4; ...@@ -2,6 +2,7 @@ connection node_4;
connection node_3; connection node_3;
connection node_2; connection node_2;
connection node_1; connection node_1;
# Correct Galera library found
connection node_1; connection node_1;
connection node_2; connection node_2;
connection node_3; connection node_3;
...@@ -87,7 +88,7 @@ expect4_390 ...@@ -87,7 +88,7 @@ expect4_390
DROP TABLE t1; DROP TABLE t1;
DROP PROCEDURE p1; DROP PROCEDURE p1;
connection node_4; connection node_4;
CALL mtr.add_suppression("BF applier failed to open_and_lock_tables: 1146"); CALL mtr.add_suppression("BF applier thread=.* failed to open_and_lock_tables for Table ");
CALL mtr.add_suppression("Event 3 Write_rows_v1 apply failed: 1146"); CALL mtr.add_suppression("Event 3 Write_rows_v1 apply failed: 1146");
CALL mtr.add_suppression("Inconsistency detected: Inconsistent by consensus"); CALL mtr.add_suppression("Inconsistency detected: Inconsistent by consensus");
CALL mtr.add_suppression("Failed to apply write set: gtid:"); CALL mtr.add_suppression("Failed to apply write set: gtid:");
...@@ -2,6 +2,7 @@ connection node_4; ...@@ -2,6 +2,7 @@ connection node_4;
connection node_3; connection node_3;
connection node_2; connection node_2;
connection node_1; connection node_1;
# Correct Galera library found
connection node_1; connection node_1;
connection node_2; connection node_2;
connection node_3; connection node_3;
...@@ -89,13 +90,13 @@ expect4_390 ...@@ -89,13 +90,13 @@ expect4_390
DROP TABLE t1; DROP TABLE t1;
DROP PROCEDURE p1; DROP PROCEDURE p1;
connection node_1; connection node_1;
CALL mtr.add_suppression("BF applier failed to open_and_lock_tables: 1146"); CALL mtr.add_suppression("BF applier thread=.* failed to open_and_lock_tables for Table ");
CALL mtr.add_suppression("Event 3 Write_rows_v1 apply failed: 1146"); CALL mtr.add_suppression("Event 3 Write_rows_v1 apply failed: 1146");
connection node_2; connection node_2;
CALL mtr.add_suppression("BF applier failed to open_and_lock_tables: 1146"); CALL mtr.add_suppression("BF applier thread=.* failed to open_and_lock_tables for Table ");
CALL mtr.add_suppression("Event 3 Write_rows_v1 apply failed: 1146"); CALL mtr.add_suppression("Event 3 Write_rows_v1 apply failed: 1146");
connection node_3; connection node_3;
CALL mtr.add_suppression("Vote 0 \\(success\\) on .* is inconsistent with group"); CALL mtr.add_suppression("Vote 0 \\(success\\) on .* is inconsistent with group");
connection node_4; connection node_4;
CALL mtr.add_suppression("BF applier failed to open_and_lock_tables: 1146"); CALL mtr.add_suppression("BF applier thread=.* failed to open_and_lock_tables for Table ");
CALL mtr.add_suppression("Event 3 Write_rows_v1 apply failed: 1146"); CALL mtr.add_suppression("Event 3 Write_rows_v1 apply failed: 1146");
...@@ -7,6 +7,10 @@ ...@@ -7,6 +7,10 @@
--source include/big_test.inc --source include/big_test.inc
--source include/have_debug_sync.inc --source include/have_debug_sync.inc
# Make sure that the test is operating on the right version of galera library.
--let $galera_version=26.4.19
source ../wsrep/include/check_galera_version.inc;
--let $node_1=node_1 --let $node_1=node_1
--let $node_2=node_2 --let $node_2=node_2
--let $node_3=node_3 --let $node_3=node_3
...@@ -150,7 +154,7 @@ DROP TABLE t1; ...@@ -150,7 +154,7 @@ DROP TABLE t1;
DROP TABLE t2; DROP TABLE t2;
DROP PROCEDURE p1; DROP PROCEDURE p1;
CALL mtr.add_suppression("BF applier failed to open_and_lock_tables: 1146"); CALL mtr.add_suppression("BF applier thread=.* failed to open_and_lock_tables for Table ");
CALL mtr.add_suppression("Event 3 Write_rows_v1 apply failed: 1146"); CALL mtr.add_suppression("Event 3 Write_rows_v1 apply failed: 1146");
CALL mtr.add_suppression("Inconsistency detected: Failed on preordered"); CALL mtr.add_suppression("Inconsistency detected: Failed on preordered");
CALL mtr.add_suppression("Failed to apply write set"); CALL mtr.add_suppression("Failed to apply write set");
......
...@@ -67,7 +67,7 @@ DROP TABLE t2; ...@@ -67,7 +67,7 @@ DROP TABLE t2;
--source galera_vote_joined_end.inc --source galera_vote_joined_end.inc
--connection node_4 --connection node_4
CALL mtr.add_suppression("BF applier failed to open_and_lock_tables: 1146"); CALL mtr.add_suppression("BF applier thread=.* failed to open_and_lock_tables for Table ");
CALL mtr.add_suppression("Event 3 Write_rows_v1 apply failed: 1146"); CALL mtr.add_suppression("Event 3 Write_rows_v1 apply failed: 1146");
CALL mtr.add_suppression("Inconsistency detected: Inconsistent by consensus"); CALL mtr.add_suppression("Inconsistency detected: Inconsistent by consensus");
CALL mtr.add_suppression("Failed to apply write set: gtid:"); CALL mtr.add_suppression("Failed to apply write set: gtid:");
...@@ -6,6 +6,10 @@ ...@@ -6,6 +6,10 @@
--source include/big_test.inc --source include/big_test.inc
--source include/have_debug_sync.inc --source include/have_debug_sync.inc
# Make sure that the test is operating on the right version of galera library.
--let $galera_version=26.4.19
source ../wsrep/include/check_galera_version.inc;
--let $node_1=node_1 --let $node_1=node_1
--let $node_2=node_2 --let $node_2=node_2
--let $node_3=node_3 --let $node_3=node_3
......
...@@ -85,16 +85,16 @@ EOF ...@@ -85,16 +85,16 @@ EOF
--source galera_vote_joined_end.inc --source galera_vote_joined_end.inc
--connection node_1 --connection node_1
CALL mtr.add_suppression("BF applier failed to open_and_lock_tables: 1146"); CALL mtr.add_suppression("BF applier thread=.* failed to open_and_lock_tables for Table ");
CALL mtr.add_suppression("Event 3 Write_rows_v1 apply failed: 1146"); CALL mtr.add_suppression("Event 3 Write_rows_v1 apply failed: 1146");
--connection node_2 --connection node_2
CALL mtr.add_suppression("BF applier failed to open_and_lock_tables: 1146"); CALL mtr.add_suppression("BF applier thread=.* failed to open_and_lock_tables for Table ");
CALL mtr.add_suppression("Event 3 Write_rows_v1 apply failed: 1146"); CALL mtr.add_suppression("Event 3 Write_rows_v1 apply failed: 1146");
--connection node_3 --connection node_3
CALL mtr.add_suppression("Vote 0 \\(success\\) on .* is inconsistent with group"); CALL mtr.add_suppression("Vote 0 \\(success\\) on .* is inconsistent with group");
--connection node_4 --connection node_4
CALL mtr.add_suppression("BF applier failed to open_and_lock_tables: 1146"); CALL mtr.add_suppression("BF applier thread=.* failed to open_and_lock_tables for Table ");
CALL mtr.add_suppression("Event 3 Write_rows_v1 apply failed: 1146"); CALL mtr.add_suppression("Event 3 Write_rows_v1 apply failed: 1146");
...@@ -1890,4 +1890,17 @@ create_data ...@@ -1890,4 +1890,17 @@ create_data
SST_PID="$DATA/wsrep_sst.pid" SST_PID="$DATA/wsrep_sst.pid"
if [ -n "${MTR_SST_JOINER_DELAY:-}" ]; then
MTR_SST_JOINER_DELAY=$(trim_string "$MTR_SST_JOINER_DELAY")
fi
simulate_long_sst()
{
# Delay for MTR tests if needed to simulate long SST/IST:
if [ ${MTR_SST_JOINER_DELAY:-0} -gt 0 ]; then
wsrep_log_info "Sleeping $MTR_SST_JOINER_DELAY seconds for MTR test"
sleep $MTR_SST_JOINER_DELAY
fi
}
wsrep_log_info "$WSREP_METHOD $WSREP_TRANSFER_TYPE started on $WSREP_SST_OPT_ROLE" wsrep_log_info "$WSREP_METHOD $WSREP_TRANSFER_TYPE started on $WSREP_SST_OPT_ROLE"
...@@ -1492,6 +1492,8 @@ else # joiner ...@@ -1492,6 +1492,8 @@ else # joiner
exit 2 exit 2
fi fi
simulate_long_sst
# use donor magic file, if present # use donor magic file, if present
# if IST was used, donor magic file was not created # if IST was used, donor magic file was not created
# Remove special tags from the magic file, and from the output: # Remove special tags from the magic file, and from the output:
......
...@@ -184,5 +184,9 @@ else ...@@ -184,5 +184,9 @@ else
echo "$SET_START_POSITION" | $MYSQL || exit $? echo "$SET_START_POSITION" | $MYSQL || exit $?
fi fi
if [ "$WSREP_SST_OPT_ROLE" = 'joiner' ]; then
simulate_long_sst
fi
wsrep_log_info "$WSREP_METHOD $WSREP_TRANSFER_TYPE completed on $WSREP_SST_OPT_ROLE" wsrep_log_info "$WSREP_METHOD $WSREP_TRANSFER_TYPE completed on $WSREP_SST_OPT_ROLE"
exit 0 exit 0
...@@ -915,12 +915,7 @@ EOF ...@@ -915,12 +915,7 @@ EOF
fi fi
fi fi
# Delay for MTR tests if needed to simulate long SST simulate_long_sst
if [ ${MTR_SST_JOINER_DELAY:=0} -gt 0 ]
then
wsrep_log_info "Sleeping $MTR_SST_JOINER_DELAY seconds for MTR test"
sleep $MTR_SST_JOINER_DELAY
fi
# Remove special tags from the magic file, and from the output: # Remove special tags from the magic file, and from the output:
coords=$(head -n1 "$MAGIC_FILE") coords=$(head -n1 "$MAGIC_FILE")
......
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