mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
MDEV-23021: rpl.rpl_parallel_optimistic_until fails in Buildbot
The test case accessed slave-relay-bin.000003 without waiting for the IO thread to write it first. If the IO thread was slow, this could fail. Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
This commit is contained in:
parent
5055490c17
commit
b2e312b055
1 changed files with 22 additions and 1 deletions
|
@ -263,13 +263,34 @@ BEGIN;
|
|||
START SLAVE IO_THREAD;
|
||||
--source include/wait_for_slave_io_to_start.inc
|
||||
|
||||
# The following test sets the stop coordinate is set to inside the first event
|
||||
# The following test sets the stop coordinate to inside the first event
|
||||
# of a relay log that holds events of a transaction started in an earlier log.
|
||||
# Peek the stop position in the middle of trx1, not even on a event boundary.
|
||||
--let $pos_until=255
|
||||
--let $file_rl=slave-relay-bin.000003
|
||||
--let $binlog_file=$file_rl
|
||||
|
||||
# Wait for the IO thread to write the trx1 to the relaylog before querying it.
|
||||
# (wait_for_slave_param.inc isn't flexible enough, so do it manually.)
|
||||
--let $continue= 1
|
||||
--let $count=600
|
||||
while ($continue)
|
||||
{
|
||||
--let $cur_file= query_get_value(SHOW SLAVE STATUS, 'Master_Log_File', 1)
|
||||
--let $cur_pos= query_get_value(SHOW SLAVE STATUS, 'Read_Master_Log_Pos', 1)
|
||||
--let $continue= `SELECT '$cur_file' = '$fil_1' AND $cur_pos < $pos_trx1`
|
||||
if ($continue)
|
||||
{
|
||||
--dec $count
|
||||
if (!$count)
|
||||
{
|
||||
--echo **** ERROR: timeout waiting for Read_Master_Log_Pos($cur_pos) >= $pos_trx1 (file='$cur_file') ****"
|
||||
--die Timeout waiting for IO thread to write master events to the relaylog
|
||||
}
|
||||
--sleep 0.1
|
||||
}
|
||||
}
|
||||
|
||||
--let $pos_xid=508
|
||||
--let $info= query_get_value(SHOW RELAYLOG EVENTS IN '$file_rl' FROM $pos_xid LIMIT 1, Info, 1)
|
||||
|
||||
|
|
Loading…
Reference in a new issue