MySQL 26.10.0
Source Code Documentation
Parsed_index_lru_cache Class Reference

Parsed index cache for redo parsing. More...

#include <log0parsed_index_lru_cache.h>

Classes

struct  Index_deleter
 

Public Types

using sequence = std::basic_string< byte >
 
using sequence_view = std::basic_string_view< byte >
 

Public Member Functions

 Parsed_index_lru_cache ()
 
 Parsed_index_lru_cache (const Parsed_index_lru_cache &)=delete
 
Parsed_index_lru_cache & operator= (const Parsed_index_lru_cache &)=delete
 
dict_index_t * lookup (sequence_view &buffer)
 
bool insert_mru (sequence_view key, dict_index_t *index)
 

Static Public Attributes

static constexpr size_t k_capacity = 100
 A single dict_index_t + dict_table_t takes several kilobytes. More...
 

Private Types

using Value = std::unique_ptr< dict_index_t, Index_deleter >
 

Private Attributes

ut::prefix_cache< byte, Value > m_cache
 

Detailed Description

Parsed index cache for redo parsing.

This wrapper binds ut::prefix_cache<byte, Value> to the redo parsing use case where Value is a unique_ptr owning dict_index_t with custom cleanup.

Member Typedef Documentation

◆ sequence

using Parsed_index_lru_cache::sequence = std::basic_string<byte>

◆ sequence_view

using Parsed_index_lru_cache::sequence_view = std::basic_string_view<byte>

◆ Value

using Parsed_index_lru_cache::Value = std::unique_ptr<dict_index_t, Index_deleter>
private

Constructor & Destructor Documentation

◆ Parsed_index_lru_cache() [1/2]

Parsed_index_lru_cache::Parsed_index_lru_cache ( )
inline

◆ Parsed_index_lru_cache() [2/2]

Parsed_index_lru_cache::Parsed_index_lru_cache ( const Parsed_index_lru_cache &  )
delete

Member Function Documentation

◆ insert_mru()

bool Parsed_index_lru_cache::insert_mru ( sequence_view  key,
dict_index_t *  index 
)
inline

◆ lookup()

dict_index_t * Parsed_index_lru_cache::lookup ( sequence_view &  buffer)
inline

◆ operator=()

Parsed_index_lru_cache & Parsed_index_lru_cache::operator= ( const Parsed_index_lru_cache &  )
delete

Member Data Documentation

◆ k_capacity

constexpr size_t Parsed_index_lru_cache::k_capacity = 100
staticconstexpr

A single dict_index_t + dict_table_t takes several kilobytes.

InnoDB recovery logic needs one cache for the main thread doing the parsing, and one for each of srv_n_read_io_threads.

◆ m_cache

ut::prefix_cache<byte, Value> Parsed_index_lru_cache::m_cache
private

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