Commit 71665ea0 authored by unknown's avatar unknown

Problem: sporadic pushbuild errors in rpl_ndb_basic.

The reason is that we are using a sleep to wait for slave to reach the
slave_transaction_retries limit.
Fix: wait for the slave to stop instead. This is what we want to do, since
the slave stops when the limit is reached.
parent c05c52fe
...@@ -184,14 +184,11 @@ set GLOBAL slave_transaction_retries=1; ...@@ -184,14 +184,11 @@ set GLOBAL slave_transaction_retries=1;
--echo **** On Master **** --echo **** On Master ****
UPDATE t1 SET `nom`="DEAD" WHERE `nid`=1; UPDATE t1 SET `nom`="DEAD" WHERE `nid`=1;
# wait for deadlock to be detected # Wait for deadlock to be detected.
# sleep longer than dead lock detection timeout in config # When detected, the slave will stop, so we just wait for it to stop.
# we do this 2 times, once with few retries to verify that we source include/wait_for_slave_sql_to_stop.inc;
# get a failure with the set sleep, and once with the _same_
# sleep, but with more retries to get it to succeed # Replication should have stopped, since max retries were not enough.
--sleep 5
# replication should have stopped, since max retries where not enough
# verify with show slave status # verify with show slave status
--connection slave --connection slave
--echo **** On Slave **** --echo **** On Slave ****
...@@ -202,9 +199,14 @@ UPDATE t1 SET `nom`="DEAD" WHERE `nid`=1; ...@@ -202,9 +199,14 @@ UPDATE t1 SET `nom`="DEAD" WHERE `nid`=1;
# now set max retries high enough to succeed, and start slave again # now set max retries high enough to succeed, and start slave again
set GLOBAL slave_transaction_retries=10; set GLOBAL slave_transaction_retries=10;
START SLAVE; START SLAVE;
# wait for deadlock to be detected and retried source include/wait_for_slave_to_start.inc;
# should be the same sleep as above for test to be valid # Wait for deadlock to be detected and retried.
--sleep 5 # We want to wait until at least one retry has been made, but before
# the slave stops. currently, there is no safe way to do that: we
# would need to access the retry counter, but that is not exposed.
# Failing that, we just wait sufficiently long that one but not all
# retries have been made. See BUG#35183.
sleep 5;
# commit transaction to release lock on row and let replication succeed # commit transaction to release lock on row and let replication succeed
select * from t1 order by nid; select * from t1 order by nid;
......
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