• Brandon Nesterenko's avatar
    MDEV-29639: Seconds_Behind_Master is incorrect for Delayed, Parallel Replicas · d69e8357
    Brandon Nesterenko authored
    Problem
    ========
    On a parallel, delayed replica, Seconds_Behind_Master will not be
    calculated until after MASTER_DELAY seconds have passed and the
    event has finished executing, resulting in potentially very large
    values of Seconds_Behind_Master (which could be much larger than the
    MASTER_DELAY parameter) for the entire duration the event is
    delayed. This contradicts the documented MASTER_DELAY behavior,
    which specifies how many seconds to withhold replicated events from
    execution.
    
    Solution
    ========
    After a parallel replica idles, the first event after idling should
    immediately update last_master_timestamp with the time that it began
    execution on the primary.
    
    Reviewed By
    ===========
    Andrei Elkin <andrei.elkin@mariadb.com>
    d69e8357
rpl_parallel.cc 91 KB