• Pedro Gomes's avatar
    BUG#13545447: RPL_ROTATE_LOGS FAILS DUE TO CONCURRENCY ISSUES IN REP. CODE · 80699f32
    Pedro Gomes authored
    In method mysql_binlog_send, right after detecting a EOF in the
    read event loop, and before deciding if we should change to a new
    binlog file there is a execution window where new events can be
    written to the binlog and a rotation can happen. When reaching
    the test, the function will then change to a new binlog file
    ignoring all the events written in this window. This will result
    in events not being replicated.
    
    Only when the binlog is detected as deactivated in the event loop
    of the dump thread, can we really know that no more events
    remain. For this reason, this test is now made under the log lock
    in the beginning of the event loop when reading the events.
    80699f32
sql_repl.cc 57.4 KB