• Marko Mäkelä's avatar
    MDEV-28845 InnoDB: Failing assertion: bpage->can_relocate() in buf0lru.cc · 253806df
    Marko Mäkelä authored
    Since commit 0b47c126 (MDEV-13542)
    we treat all-zero pages as corrupted ones.
    
    During a stress test, a read-ahead of an all-zero page was triggered
    and the page read was completed concurrently with buf_page_create_low().
    This caused the assertion to fail, because buf_page_create_low() was
    waiting for the page latch.
    
    buf_page_get_low(): Only invoke buf_pool_t::corrupted_evict()
    if the block was not already marked as corrupted.
    
    buf_page_create_low(): On page identifier mismatch, retry the
    buf_pool.page_hash lookup.
    
    buf_pool_t::corrupted_evict(): Set the state of the block to FREED
    so that a concurrent buf_page_get_low() will refuse to load the page.
    Wait for the page latch to be vacant before proceeding to remove
    the block from buf_pool.page_hash and buf_pool.LRU.
    
    page_id_t::set_corrupted(), page_id_t::is_corrupted(): Accessors
    for indicating a corrupted page identifier.
    
    Tested by Matthias Leich
    253806df
buf0buf.cc 121 KB