• Thirunarayanan Balathandayuthapani's avatar
    MDEV-23233: Race condition for btr_search_drop_page_hash_index() in buf_page_create() · a1f899a8
    Thirunarayanan Balathandayuthapani authored
    commit ad6171b9 (MDEV-22456)
    introduced code to buf_page_create() that would lazily drop
    adaptive hash index entries for an index that has been
    evicted from the data dictionary cache.
    
    Unfortunately, that call was missing adequate protection.
    While the btr_search_drop_page_hash_index(block) was executing,
    the block could be reused for something else.
    
    buf_page_create(): If btr_search_drop_page_hash_index() must be
    invoked, pin the block before releasing the buf_pool->page_hash lock,
    so that the block cannot be grabbed by other threads.
    a1f899a8
buf0buf.cc 203 KB