• Marko Mäkelä's avatar
    MDEV-33361 Excessive delays in SET GLOBAL innodb_log_file_size · 93189df4
    Marko Mäkelä authored
    innodb_log_file_size_update(): Wait for buf_pool.done_flush_list
    (that a flush batch has completed), not buf_pool.do_flush_list
    (that the buf_flush_page_cleaner was woken up).
    
    The condition variable buf_pool.done_flush_list is broadcast by the
    buf_flush_page_cleaner() at the end of each batch, which is when the
    log checkpoint can advance and where any log resizing may be completed.
    The purpose of the condition variable buf_pool.do_flush_list is to
    wake up the buf_flush_page_cleaner() thread because there is work to do.
    If no thread is signaling that condition variable, this loop could
    unnecessarily wait for up to 5 seconds too long for the log resizing
    to be completed. By consuming signals it could also prevent the
    buf_flush_page_cleaner() thread from waking up.
    
    Tested by: Matthias Leich
    93189df4
ha_innodb.cc 610 KB