MySQL 9.1.0
Source Code Documentation
trx_rseg_t Struct Reference

The rollback segment memory object. More...

#include <trx0types.h>

Public Types

using Undo_list = UT_LIST_BASE_NODE_T_EXTERN(trx_undo_t, undo_list)
 

Public Member Functions

bool validate_curr_size (bool take_mutex=true)
 Validate the curr_size member by re-calculating it. More...
 
void latch ()
 Enter the rseg->mutex. More...
 
void unlatch ()
 Exit the rseg->mutex. More...
 
void decr_curr_size (page_no_t npages=1)
 Decrement the current size of the rollback segment by the given number of pages. More...
 
void incr_curr_size ()
 Increment the current size of the rollback segment by the given number of pages. More...
 
page_no_t get_curr_size () const
 
void set_curr_size (page_no_t npages)
 
std::ostream & print (std::ostream &out) const
 

Public Attributes

size_t id {}
 rollback segment id == the index of its slot in the trx system file copy More...
 
RsegMutex mutex
 mutex protecting the fields in this struct except id,space,page_no which are constant More...
 
space_id_t space_id {}
 space ID where the rollback segment header is placed More...
 
page_no_t page_no {}
 page number of the rollback segment header More...
 
page_size_t page_size
 page size of the relevant tablespace More...
 
page_no_t max_size {}
 maximum allowed size in pages More...
 
Undo_list update_undo_list
 List of update undo logs. More...
 
Undo_list update_undo_cached
 List of update undo log segments cached for fast reuse. More...
 
Undo_list insert_undo_list
 List of insert undo logs. More...
 
Undo_list insert_undo_cached
 List of insert undo log segments cached for fast reuse. More...
 
page_no_t last_page_no {}
 Page number of the last not yet purged log header in the history list; FIL_NULL if all list purged. More...
 
size_t last_offset {}
 Byte offset of the last not yet purged log header. More...
 
trx_id_t last_trx_no
 Transaction number of the last not yet purged log. More...
 
bool last_del_marks {}
 true if the last not yet purged log needs purging More...
 
std::atomic< size_t > trx_ref_count {}
 Reference counter to track rseg allocated transactions. More...
 

Private Attributes

page_no_t curr_size {}
 current size in pages More...
 

Detailed Description

The rollback segment memory object.

Member Typedef Documentation

◆ Undo_list

Member Function Documentation

◆ decr_curr_size()

void trx_rseg_t::decr_curr_size ( page_no_t  npages = 1)
inline

Decrement the current size of the rollback segment by the given number of pages.

Parameters
[in]npagesnumber of pages to reduce in size.

◆ get_curr_size()

page_no_t trx_rseg_t::get_curr_size ( ) const
inline

◆ incr_curr_size()

void trx_rseg_t::incr_curr_size ( )
inline

Increment the current size of the rollback segment by the given number of pages.

◆ latch()

void trx_rseg_t::latch ( )
inline

Enter the rseg->mutex.

◆ print()

std::ostream & trx_rseg_t::print ( std::ostream &  out) const
inline

◆ set_curr_size()

void trx_rseg_t::set_curr_size ( page_no_t  npages)
inline

◆ unlatch()

void trx_rseg_t::unlatch ( )
inline

Exit the rseg->mutex.

◆ validate_curr_size()

bool trx_rseg_t::validate_curr_size ( bool  take_mutex = true)

Validate the curr_size member by re-calculating it.

Parameters
[in]take_mutextake the rseg->mutex. default is true.
Returns
true if valid, false otherwise.

Member Data Documentation

◆ curr_size

page_no_t trx_rseg_t::curr_size {}
private

current size in pages

◆ id

size_t trx_rseg_t::id {}

rollback segment id == the index of its slot in the trx system file copy

◆ insert_undo_cached

Undo_list trx_rseg_t::insert_undo_cached

List of insert undo log segments cached for fast reuse.

◆ insert_undo_list

Undo_list trx_rseg_t::insert_undo_list

List of insert undo logs.

◆ last_del_marks

bool trx_rseg_t::last_del_marks {}

true if the last not yet purged log needs purging

◆ last_offset

size_t trx_rseg_t::last_offset {}

Byte offset of the last not yet purged log header.

◆ last_page_no

page_no_t trx_rseg_t::last_page_no {}

Page number of the last not yet purged log header in the history list; FIL_NULL if all list purged.

◆ last_trx_no

trx_id_t trx_rseg_t::last_trx_no

Transaction number of the last not yet purged log.

◆ max_size

page_no_t trx_rseg_t::max_size {}

maximum allowed size in pages

◆ mutex

RsegMutex trx_rseg_t::mutex

mutex protecting the fields in this struct except id,space,page_no which are constant

◆ page_no

page_no_t trx_rseg_t::page_no {}

page number of the rollback segment header

◆ page_size

page_size_t trx_rseg_t::page_size

page size of the relevant tablespace

◆ space_id

space_id_t trx_rseg_t::space_id {}

space ID where the rollback segment header is placed

◆ trx_ref_count

std::atomic<size_t> trx_rseg_t::trx_ref_count {}

Reference counter to track rseg allocated transactions.

◆ update_undo_cached

Undo_list trx_rseg_t::update_undo_cached

List of update undo log segments cached for fast reuse.

◆ update_undo_list

Undo_list trx_rseg_t::update_undo_list

List of update undo logs.


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