MySQL 8.0.40
Source Code Documentation
trx_purge_t Struct Reference

The control structure used in the purge operation. More...

#include <trx0purge.h>

Public Attributes

sess_tsess
 System session running the purge query. More...
 
trx_ttrx
 System transaction running the purge query: this trx is not in the trx list of the trx system and it never ends. More...
 
rw_lock_t latch
 The latch protecting the purge view. More...
 
os_event_t event
 State signal event. More...
 
ulint n_stop
 Counter to track number stops. More...
 
volatile bool running
 true, if purge is active, we check this without the latch too More...
 
volatile purge_state_t state
 Purge coordinator thread states, we check this in several places without holding the latch. More...
 
que_tquery
 The query graph which will do the parallelized purge operation. More...
 
ReadView view
 The purge will not remove undo logs which are >= this view (purge view) More...
 
bool view_active
 true if view is active More...
 
volatile ulint n_submitted
 Count of total tasks submitted to the task queue. More...
 
std::atomic< ulintn_completed
 Count of total tasks completed. More...
 
purge_iter_t iter
 Limit up to which we have read and parsed the UNDO log records. More...
 
purge_iter_t limit
 The 'purge pointer' which advances during a purge, and which is used in history list truncation. More...
 
purge_iter_t done
 Indicate 'purge pointer' which have purged already accurately. More...
 
bool next_stored
 true if the info of the next record to purge is stored below: if yes, then the transaction number and the undo number of the record are stored in purge_trx_no and purge_undo_no above More...
 
trx_rseg_trseg
 Rollback segment for the next undo record to purge. More...
 
page_no_t page_no
 Page number for the next undo record to purge, page number of the log header, if dummy record. More...
 
ulint offset
 Page offset for the next undo record to purge, 0 if the dummy record. More...
 
page_no_t hdr_page_no
 Header page of the undo log where the next record to purge belongs. More...
 
ulint hdr_offset
 Header byte offset on the page. More...
 
TrxUndoRsegsIteratorrseg_iter
 Iterator to get the next rseg to process. More...
 
purge_pq_tpurge_queue
 Binary min-heap, ordered on TrxUndoRsegs::trx_no. More...
 
PQMutex pq_mutex
 Mutex protecting purge_queue. More...
 
undo::Truncate undo_trunc
 Track UNDO tablespace marked for truncate. More...
 
mem_heap_theap
 Heap for reading the undo log records. More...
 
std::vector< trx_rseg_t * > rsegs_queue
 Set of all rseg queue. More...
 

Static Public Attributes

static thread_local bool is_this_a_purge_thread {false}
 Is the this thread related to purge? This is false by default and set to true by srv_purge_coordinator_thread() and srv_worker_thread() only. More...
 

Detailed Description

The control structure used in the purge operation.

Member Data Documentation

◆ done

purge_iter_t trx_purge_t::done

Indicate 'purge pointer' which have purged already accurately.

◆ event

os_event_t trx_purge_t::event

State signal event.

◆ hdr_offset

ulint trx_purge_t::hdr_offset

Header byte offset on the page.

◆ hdr_page_no

page_no_t trx_purge_t::hdr_page_no

Header page of the undo log where the next record to purge belongs.

◆ heap

mem_heap_t* trx_purge_t::heap

Heap for reading the undo log records.

◆ is_this_a_purge_thread

thread_local bool trx_purge_t::is_this_a_purge_thread {false}
inlinestatic

Is the this thread related to purge? This is false by default and set to true by srv_purge_coordinator_thread() and srv_worker_thread() only.

◆ iter

purge_iter_t trx_purge_t::iter

Limit up to which we have read and parsed the UNDO log records.

Not necessarily purged from the indexes. Note that this can never be less than the limit below, we check for this invariant in trx0purge.cc

◆ latch

rw_lock_t trx_purge_t::latch

The latch protecting the purge view.

A purge operation must acquire an x-latch here for the instant at which it changes the purge view: an undo log operation can prevent this by obtaining an s-latch here. It also protects state and running

◆ limit

purge_iter_t trx_purge_t::limit

The 'purge pointer' which advances during a purge, and which is used in history list truncation.

◆ n_completed

std::atomic<ulint> trx_purge_t::n_completed

Count of total tasks completed.

◆ n_stop

ulint trx_purge_t::n_stop

Counter to track number stops.

◆ n_submitted

volatile ulint trx_purge_t::n_submitted

Count of total tasks submitted to the task queue.

◆ next_stored

bool trx_purge_t::next_stored

true if the info of the next record to purge is stored below: if yes, then the transaction number and the undo number of the record are stored in purge_trx_no and purge_undo_no above

◆ offset

ulint trx_purge_t::offset

Page offset for the next undo record to purge, 0 if the dummy record.

◆ page_no

page_no_t trx_purge_t::page_no

Page number for the next undo record to purge, page number of the log header, if dummy record.

◆ pq_mutex

PQMutex trx_purge_t::pq_mutex

Mutex protecting purge_queue.

◆ purge_queue

purge_pq_t* trx_purge_t::purge_queue

Binary min-heap, ordered on TrxUndoRsegs::trx_no.

It is protected by the pq_mutex

◆ query

que_t* trx_purge_t::query

The query graph which will do the parallelized purge operation.

◆ rseg

trx_rseg_t* trx_purge_t::rseg

Rollback segment for the next undo record to purge.

◆ rseg_iter

TrxUndoRsegsIterator* trx_purge_t::rseg_iter

Iterator to get the next rseg to process.

◆ rsegs_queue

std::vector<trx_rseg_t *> trx_purge_t::rsegs_queue

Set of all rseg queue.

◆ running

volatile bool trx_purge_t::running

true, if purge is active, we check this without the latch too

◆ sess

sess_t* trx_purge_t::sess

System session running the purge query.

◆ state

volatile purge_state_t trx_purge_t::state

Purge coordinator thread states, we check this in several places without holding the latch.

◆ trx

trx_t* trx_purge_t::trx

System transaction running the purge query: this trx is not in the trx list of the trx system and it never ends.

◆ undo_trunc

undo::Truncate trx_purge_t::undo_trunc

Track UNDO tablespace marked for truncate.

◆ view

ReadView trx_purge_t::view

The purge will not remove undo logs which are >= this view (purge view)

◆ view_active

bool trx_purge_t::view_active

true if view is active


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