Skip to content

Commit

Permalink
MDEV-22871: Clean up btr_search_sys
Browse files Browse the repository at this point in the history
btr_search_sys::parts[]: A single structure for the partitions of
the adaptive hash index. Replaces the 3 separate arrays:
btr_search_latches[], btr_search_sys->hash_tables,
btr_search_sys->hash_tables[i]->heap.

hash_table_t::heap, hash_table_t::adaptive: Remove.

ha0ha.cc: Remove. Move all code to btr0sea.cc.
  • Loading branch information
dr-m committed Jun 18, 2020
1 parent 9159b89 commit bf3c862
Show file tree
Hide file tree
Showing 17 changed files with 497 additions and 892 deletions.
1 change: 0 additions & 1 deletion storage/innobase/CMakeLists.txt
Expand Up @@ -56,7 +56,6 @@ SET(INNOBASE_SOURCES
fsp/fsp0space.cc
fsp/fsp0sysspace.cc
fut/fut0lst.cc
ha/ha0ha.cc
ha/ha0storage.cc
ha/hash0hash.cc
fts/fts0fts.cc
Expand Down
6 changes: 3 additions & 3 deletions storage/innobase/btr/btr0cur.cc
Expand Up @@ -3561,7 +3561,7 @@ btr_cur_optimistic_insert(
ut_ad(index->is_instant());
ut_ad(flags == BTR_NO_LOCKING_FLAG);
} else {
rw_lock_t* ahi_latch = btr_get_search_latch(index);
rw_lock_t* ahi_latch = btr_search_sys.get_latch(*index);
if (!reorg && cursor->flag == BTR_CUR_HASH) {
btr_search_update_hash_node_on_insert(
cursor, ahi_latch);
Expand Down Expand Up @@ -3772,7 +3772,7 @@ btr_cur_pessimistic_insert(
ut_ad(!(flags & BTR_CREATE_FLAG));
} else {
btr_search_update_hash_on_insert(
cursor, btr_get_search_latch(index));
cursor, btr_search_sys.get_latch(*index));
}
#endif /* BTR_CUR_HASH_ADAPT */
if (inherit && !(flags & BTR_NO_LOCKING_FLAG)) {
Expand Down Expand Up @@ -4274,7 +4274,7 @@ btr_cur_update_in_place(
#ifdef BTR_CUR_HASH_ADAPT
{
rw_lock_t* ahi_latch = block->index
? btr_get_search_latch(index) : NULL;
? btr_search_sys.get_latch(*index) : NULL;
if (ahi_latch) {
/* TO DO: Can we skip this if none of the fields
index->search_info->curr_n_fields
Expand Down

0 comments on commit bf3c862

Please sign in to comment.