Skip to content
  • Sujatha Sivakumar's avatar
    8a4ca611
    Bug#21198611: MULTI-THREADED SLAVE LOG SPAMMING ON FAILURE · 8a4ca611
    Sujatha Sivakumar authored
    Problem:
    =======
    When a multi-threaded slave stops with an error, the same
    error message is printed three times.
    
    Analysis:
    =========
    "sql_slave_killed" function is called frequently to check
    if SQL thread is alive or got killed. This function doesn't
    preserve SQL thread's kill command acceptance status. This
    causes the whole function to be re-executed each time. i.e
    even though the kill command got accepted during previous
    execution, since it is not preserved the function is
    re-executed. As part of this function's execution when SQL
    thread accepts kill status it prints few error messages to
    let the user know the current status. Because of these
    re-executions these error messages are also printed once
    again in the error log.
    
    Fix:
    ===
    Added a new variable which stores the SQL thread's kill
    acceptance status. If kill is accepted it is set to true
    and the error messages are printed only once at this point.
    During further invocations of this function, since kill
    is already accepted, nothing will be done by this function
    it simply returns the kill acceptance status.
    8a4ca611
    Bug#21198611: MULTI-THREADED SLAVE LOG SPAMMING ON FAILURE
    Sujatha Sivakumar authored
    Problem:
    =======
    When a multi-threaded slave stops with an error, the same
    error message is printed three times.
    
    Analysis:
    =========
    "sql_slave_killed" function is called frequently to check
    if SQL thread is alive or got killed. This function doesn't
    preserve SQL thread's kill command acceptance status. This
    causes the whole function to be re-executed each time. i.e
    even though the kill command got accepted during previous
    execution, since it is not preserved the function is
    re-executed. As part of this function's execution when SQL
    thread accepts kill status it prints few error messages to
    let the user know the current status. Because of these
    re-executions these error messages are also printed once
    again in the error log.
    
    Fix:
    ===
    Added a new variable which stores the SQL thread's kill
    acceptance status. If kill is accepted it is set to true
    and the error messages are printed only once at this point.
    During further invocations of this function, since kill
    is already accepted, nothing will be done by this function
    it simply returns the kill acceptance status.
Loading