• Andrei Elkin's avatar
    MDEV-17133 dump thread reads from a past position · 5b735e8f
    Andrei Elkin authored
    According to logs analysis the Dump thread attempted to read again data which
    was already sent. The reason of regressed read turns out in an _my_b_cache_read()
    early exit branch which missed to distinguish between total zero size read (e.g
    ineffective read when Count argument is zero) from a case when the
    requested amount of data is fully read out by sole accessing the cache's
    file. In the latter case such then *effective* reading was not
    reflected in the cache's state to screw the cache's state.
    
    Fixed with a check introduced of whether the file reading was effective prior to
    early exit. When this is the case conduct standard cache state change to
    account the actual read size.
    
    Notice the bug can show up also as an error to read binlog event e.g
    through BINLOG_GTID_POS() (of MDEV-16886).
    5b735e8f
mf_iocache-t.cc 10.9 KB