• Andrei Elkin's avatar
    Bug#11747416 : 32228 A disk full makes binary log corrupt · b426043b
    Andrei Elkin authored
    Binary log of master can get a partially logged event if the server
    runs out of disk space and, while waiting for some space to be freed,
    is shut down (or crashes). If the server is not stopped, it will just
    wait endlessly for space to be freed, thus no partial event anomaly
    occurs.  The restarted master server has had a dubious policy to send
    the incomplete event to slave which it apparently can't handle.
    Although an error was printed out the fact of sending with unclear
    error message is a source of confusion.
    Actually the problem of presence an incomplete event in the binary log
    was already fixed by WL 5493 (which was merged to our current trunk
    branch, major version 5.6). The fix makes the server truncate the
    binary log on server restart and recovery.
    
    However 5.5 master can't do that. So the current issue is a problem of
    sending incomplete events to the slave by 5.5 master.
    
    It is fixed in this patch by changing the policy so that only complete
    events are pushed by the dump thread to the IO thread. In addition,
    the error text that master sends to the slave when an incomplete event
    is found, now states that incomplete event may have been caused by an
    out-of-disk space situation and provides coordinates of
    the first and the last event bytes read.
    b426043b
rpl_cant_read_event_incident.test 1.69 KB