• Marko Mäkelä's avatar
    MDEV-26811: Assertion "log_sys->n_pending_flushes == 1" fails · 2bb8d7c2
    Marko Mäkelä authored
    In commit 1cb218c3 (MDEV-26450)
    we introduced the function log_write_and_flush(), which may
    compete with log_checkpoint() invoking log_write_flush_to_disk_low()
    from another thread.
    
    The assertion n_pending_flushes==1 is too strict.
    There is no possibility of a race condition here, because
    fil_flush() is protected by fil_system->mutex and the
    rest will be protected by log_sys->mutex.
    
    log_write_flush_to_disk_low(), log_write_and_flush():
    Relax the assertions to test for a nonzero count.
    2bb8d7c2
log0log.cc 63.3 KB