MySQL 8.4.0
Source Code Documentation
btr_search_sys_t::search_part_t Class Reference

#include <btr0sea.h>

Public Member Functions

void initialize (size_t hash_size)
 

Public Attributes

rw_lock_t latch
 The latch protecting the adaptive search part: this latch protects the (1) positions of records on those pages where a hash index has been built. More...
 
hash_table_thash_table
 The adaptive hash table, mapping dtuple_hash values to rec_t pointers on index pages. More...
 
std::atomic< buf_block_t * > free_block_for_heap
 A pointer to a free block that the heap in the hash table may use for adding new hash nodes. More...
 

Member Function Documentation

◆ initialize()

void btr_search_sys_t::search_part_t::initialize ( size_t  hash_size)

Member Data Documentation

◆ free_block_for_heap

std::atomic<buf_block_t *> btr_search_sys_t::search_part_t::free_block_for_heap

A pointer to a free block that the heap in the hash table may use for adding new hash nodes.

Changes to nullptr are done under appropriate X-latched rwlock. Changes from nullptr to non-nullptr are done without any protection. Changes from non-null to a different non-null are prohibited.

◆ hash_table

hash_table_t* btr_search_sys_t::search_part_t::hash_table

The adaptive hash table, mapping dtuple_hash values to rec_t pointers on index pages.

For any hash value at most one pointer is hold. Is protected by the part's latch. It is in a separate cache line to not collide with the possible multiple readers that are registering for the latching.

◆ latch

rw_lock_t btr_search_sys_t::search_part_t::latch

The latch protecting the adaptive search part: this latch protects the (1) positions of records on those pages where a hash index has been built.

NOTE: It does not protect values of non-ordering fields within a record from being updated in-place! We can use fact (1) to perform unique searches to indexes.


The documentation for this class was generated from the following files: