• Andrei Elkin's avatar
    MDEV-15152 Optimistic parallel slave doesnt cope well with START SLAVE UNTIL · dbe447a7
    Andrei Elkin authored
    The immediate bug was caused by a failure to recognize a correct
    position to stop the slave applier run in optimistic parallel mode.
    There were the following set of issues that the analysis unveil.
    1 incorrect estimate for the event binlog position passed to
      is_until_satisfied
    2 wait for workers to complete by the driver thread did not account non-group events
      that could be left unprocessed and thus to mix up the last executed
      binlog group's file and position:
      the file remained old and the position related to the new rotated file
    3 incorrect 'slave reached file:pos' by the parallel slave report in the error log
    4 relay log UNTIL missed out the parallel slave branch in
      is_until_satisfied.
    
    The patch addresses all of them to simplify logics of log change
    notification in either the master and relay-log until case.
    P.1 is addressed with passing the event into is_until_satisfied()
    for proper analisis by the function.
    P.2 is fixed by changes in handle_queued_pos_update().
    P.4 required removing relay-log change notification by workers.
    Instead the driver thread updates the notion of the current relay-log
    fully itself with aid of introduced
    bool Relay_log_info::until_relay_log_names_defer.
    
    An extra print out of the requested until file:pos is arranged
    with --log-warning=3.
    dbe447a7
rpl_rli.cc 71.7 KB