Skip to content
  • Venkatesh Duggirala's avatar
    0911fe2e
    Bug#21816399 5.6.24: LOST DATA DURING MASTER RESTART IF PARTIAL TRANSACT HAS BEEN DOWNLOADED · 0911fe2e
    Venkatesh Duggirala authored
    Problem: If dump thread is killed (during shutdown/explicit kill) during
    dumping a non-active binary log, events in that binary log are getting
    skipped completely and not getting replicated to slave.
    
    Analysis: During bug#19975697 fix, we have identified a case where a dump
    thread is unnecessarily looping through a binary log file even if it is
    in killed state. Problem is big enough if the binary log file is huge
    Hence we fixed it by adding thd->killed flag check in while condition.
    But after the while loop is exited, it was not checked whether while loop
    was broken due to thd->killed condition or not. Earlier the code after
    the while loop assumes that the loop processes full binary log file and
    dump thread can be safely moved to next binary log.
    But with this new condition, it is not the case.
    
    Fix: A condition "if (thd->killed)" after the while loop and should exit
    the dump thread without doing any work.
    
    (cherry picked from commit 97d9f26d153e1aa688a5328c5e691953a2761e4d)
    0911fe2e
    Bug#21816399 5.6.24: LOST DATA DURING MASTER RESTART IF PARTIAL TRANSACT HAS BEEN DOWNLOADED
    Venkatesh Duggirala authored
    Problem: If dump thread is killed (during shutdown/explicit kill) during
    dumping a non-active binary log, events in that binary log are getting
    skipped completely and not getting replicated to slave.
    
    Analysis: During bug#19975697 fix, we have identified a case where a dump
    thread is unnecessarily looping through a binary log file even if it is
    in killed state. Problem is big enough if the binary log file is huge
    Hence we fixed it by adding thd->killed flag check in while condition.
    But after the while loop is exited, it was not checked whether while loop
    was broken due to thd->killed condition or not. Earlier the code after
    the while loop assumes that the loop processes full binary log file and
    dump thread can be safely moved to next binary log.
    But with this new condition, it is not the case.
    
    Fix: A condition "if (thd->killed)" after the while loop and should exit
    the dump thread without doing any work.
    
    (cherry picked from commit 97d9f26d153e1aa688a5328c5e691953a2761e4d)
Loading