• mariadb-DebarunBanerjee's avatar
    MDEV-34265 Possible hang during IO burst with innodb_flush_sync enabled · b12c14e3
    mariadb-DebarunBanerjee authored
    When checkpoint age goes beyond the sync flush threshold and
    buf_flush_sync_lsn is set, page cleaner enters into "furious flush"
    stage to aggressively flush dirty pages from flush list and pull
    checkpoint LSN above safe margin. In this stage, page cleaner skips
    doing LRU flush and eviction.
    
    In 10.6, all other threads entirely rely on page cleaner to generate
    free pages. If free pages get over while page cleaner is busy in
    "furious flush" stage, a session thread could wait for free page in the
    middle of a min-transaction(mtr) while holding latches on other pages.
    
    It, in turn, can prevent page cleaner to flush such pages preventing
    checkpoint LSN to move forward creating a deadlock situation. Even
    otherwise, it could create a stall and hang like situation for large BP
    with plenty of dirty pages to flush before the stage could finish.
    
    Fix: During furious flush, check and evict LRU pages after each flush
    iteration.
    b12c14e3
buf0flu.cc 82.3 KB