MySQL  8.0.19
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...
 
volatile ulint n_completed
 Count of total tasks completed. More...
 
purge_iter_t iter
 
purge_iter_t limit
 
purge_iter_t done
 
ibool 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...
 

Detailed Description

The control structure used in the purge operation.

Member Data Documentation

◆ done

purge_iter_t trx_purge_t::done

◆ 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.

◆ iter

purge_iter_t trx_purge_t::iter

◆ 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

◆ n_completed

volatile 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

ibool 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.

◆ 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: