• Brandon Nesterenko's avatar
    MDEV-33500: rpl.rpl_parallel_sbm can fail on slow machines, e.g. MSAN/Valgrind builders · b04c8575
    Brandon Nesterenko authored
    In an addition to test rpl.rpl_parallel_sbm added by MDEV-32265, the
    test uses sleep statements alone to test Seconds_Behind_Master with
    delayed replication. On slow running machines, the test can pass the
    intended MASTER_DELAY duration and Seconds_Behind_Master can become
    0, when the test expects the transaction to still be actively in a
    delaying state.
    
    This can be consistently reproduced by adding a sleep statement
    before the call to
    
    --let = query_get_value(SHOW SLAVE STATUS, Seconds_Behind_Master, 1)
    
    to sleep past the delay end point.
    
    This patch fixes this by locking the table which the delayed
    transaction targets so Second_Behind_Master cannot be updated before
    the test reads it for validation.
    b04c8575
rpl_parallel_sbm.result 3.31 KB