MySQL 9.1.0
Source Code Documentation
dict_persist_t Struct Reference

Structure for persisting dynamic metadata of data dictionary. More...

#include <dict0dict.h>

Classes

class  Enable_immediate
 Write dynamic metadata to DD buffer table immediately when such data is generated. More...
 

Public Member Functions

bool check_persist_immediately () const
 

Public Attributes

 dirty_dict_tables
 List of tables whose dirty_status are marked as METADATA_DIRTY, or METADATA_BUFFERED. More...
 
ib_mutex_t mutex
 Mutex to protect data in this structure, also the dict_table_t::dirty_status and dict_table_t::in_dirty_dict_tables_list This mutex should be low-level one so that it can be used widely when necessary, so its level had to be above SYNC_LOG. More...
 
std::atomic< uint32_t > num_dirty_tables
 Number of the tables which are of status METADATA_DIRTY. More...
 
std::atomic< bool > m_persist_immediately
 If set, dynamic metadata is saved to DD buffer table immediately. More...
 
DDTableBuffertable_buffer
 DDTableBuffer table for persistent dynamic metadata. More...
 
Persisterspersisters
 Collection of instances to persist dynamic metadata. More...
 

Detailed Description

Structure for persisting dynamic metadata of data dictionary.

Member Function Documentation

◆ check_persist_immediately()

bool dict_persist_t::check_persist_immediately ( ) const
inline
Returns
true if need to write dynamic metadata to DD buffer table immediately after logging.

Member Data Documentation

◆ dirty_dict_tables

dict_persist_t::dirty_dict_tables

List of tables whose dirty_status are marked as METADATA_DIRTY, or METADATA_BUFFERED.

It's protected by the mutex

◆ m_persist_immediately

std::atomic<bool> dict_persist_t::m_persist_immediately

If set, dynamic metadata is saved to DD buffer table immediately.

Currently we consider only auto increment PM_TABLE_AUTO_INC. Corrupt index PM_INDEX_CORRUPTED is not needed to be saved immediately.

◆ mutex

ib_mutex_t dict_persist_t::mutex

Mutex to protect data in this structure, also the dict_table_t::dirty_status and dict_table_t::in_dirty_dict_tables_list This mutex should be low-level one so that it can be used widely when necessary, so its level had to be above SYNC_LOG.

However, after this mutex, persister may have to access B-tree and require tree latch, the latch level of this mutex then has to be right before the SYNC_INDEX_TREE.

◆ num_dirty_tables

std::atomic<uint32_t> dict_persist_t::num_dirty_tables

Number of the tables which are of status METADATA_DIRTY.

It's protected by the mutex

◆ persisters

Persisters* dict_persist_t::persisters

Collection of instances to persist dynamic metadata.

◆ table_buffer

DDTableBuffer* dict_persist_t::table_buffer

DDTableBuffer table for persistent dynamic metadata.


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