Skip to content

Commit

Permalink
MDEV-22611 Assertion btr_search_enabled failed during buffer pool res…
Browse files Browse the repository at this point in the history
…izing

In commit ad6171b (MDEV-22456)
we removed the acquisition of the adaptive hash index latch
from the caller of btr_search_update_hash_ref().
The tests innodb.innodb_buffer_pool_resize_with_chunks
and innodb.innodb_buffer_pool_resize
would occasionally fail starting with 10.3,
due to MDEV-12288 causing more purge activity during the test.

btr_search_update_hash_ref(): After acquiring the adaptive hash index
latch, check that the adaptive hash index is still enabled on the page.
  • Loading branch information
dr-m committed May 18, 2020
1 parent f9d8571 commit 5b6bcb5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions storage/innobase/btr/btr0sea.cc
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ btr_search_update_hash_ref(

dict_index_t* index = block->index;

if (!index) {
if (!index || !info->n_hash_potential) {
return;
}

Expand All @@ -657,8 +657,9 @@ btr_search_update_hash_ref(
ut_ad(!dict_index_is_ibuf(index));
rw_lock_t* const latch = btr_get_search_latch(index);
rw_lock_x_lock(latch);
ut_ad(!block->index || block->index == index);

if ((info->n_hash_potential > 0)
if (block->index
&& (block->curr_n_fields == info->n_fields)
&& (block->curr_n_bytes == info->n_bytes)
&& (block->curr_left_side == info->left_side)) {
Expand Down

0 comments on commit 5b6bcb5

Please sign in to comment.