mariadb/storage/innobase/btr
Marko Mäkelä 138c11cce5 MDEV-22790 Race between btr_page_mtr_lock() dropping AHI on the same block
This race condition was introduced by
commit ad6171b91c (MDEV-22456).

In the observed case, two threads were executing
btr_search_drop_page_hash_index() on the same block,
to free a stale entry that was attached to a dropped index.
Both threads were holding an S latch on the block.

We must prevent the double-free of block->index by holding
block->lock in exclusive mode.

btr_search_guess_on_hash(): Do not invoke
btr_search_drop_page_hash_index(block) to get rid of
stale entries, because we are not necessarily holding
an exclusive block->lock here.

buf_defer_drop_ahi(): New function, to safely drop stale
entries in buf_page_mtr_lock(). We will skip the call to
btr_search_drop_page_hash_index(block) when only requesting
bufferfixing (no page latch), because in that case, we should
not be accessing the adaptive hash index, and we might get
a deadlock if we acquired the page latch.
2020-06-05 15:22:46 +03:00
..
btr0btr.cc MDEV-22456 Dropping the adaptive hash index may cause DDL to lock up InnoDB 2020-05-15 17:23:08 +03:00
btr0bulk.cc MDEV-21595: innodb offset_t rename to rec_offs 2020-04-29 12:02:47 +03:00
btr0cur.cc MDEV-22646 Assertion `table2->cached' failed in dict_table_t::add_to_cache 2020-06-03 16:02:02 +05:30
btr0defragment.cc MDEV-21595: innodb offset_t rename to rec_offs 2020-04-29 12:02:47 +03:00
btr0pcur.cc MDEV-22456 Dropping the adaptive hash index may cause DDL to lock up InnoDB 2020-05-15 17:23:08 +03:00
btr0scrub.cc MDEV-21595: innodb offset_t rename to rec_offs 2020-04-29 12:02:47 +03:00
btr0sea.cc MDEV-22790 Race between btr_page_mtr_lock() dropping AHI on the same block 2020-06-05 15:22:46 +03:00