• Marko Mäkelä's avatar
    MDEV-29905 Change buffer operations fail to check for log file overflow · b737d09d
    Marko Mäkelä authored
    Every operation that is going to write redo log is supposed to
    invoke log_free_check() before acquiring any latches. If there
    is a risk of log buffer overrun, a log checkpoint would be
    triggered by that call.
    
    ibuf_merge_space(), ibuf_merge_in_background(),
    ibuf_delete_for_discarded_space(): Invoke log_free_check()
    when the current thread is not holding any page latches.
    
    Unfortunately, in lower-level code called from ibuf_insert()
    or ibuf_merge_or_delete_for_page(), some page latches may be
    held and a call to log_free_check() could hang.
    
    ibuf_set_bitmap_for_bulk_load(): Use the caller's mini-transaction.
    The caller should have invoked log_free_check() while not holding
    any page latches.
    b737d09d
ibuf0ibuf.cc 139 KB