MySQL 8.4.2
Source Code Documentation
|
Track an UNDO tablespace marked for truncate. More...
#include <trx0purge.h>
Public Member Functions | |
Truncate () | |
Constructor. More... | |
~Truncate ()=default | |
Destructor. More... | |
bool | is_marked () const |
Is tablespace selected for truncate. More... | |
void | set_marked_space_empty () |
Mark the undo tablespace selected for truncate as empty so that it will be truncated next. More... | |
bool | is_marked_space_empty () const |
Is the tablespace selected for truncate empty of undo logs yet? More... | |
void | mark (Tablespace *undo_space) |
Mark the tablespace for truncate. More... | |
space_id_t | get_marked_space_num () const |
Get the ID of the tablespace marked for truncate. More... | |
void | reset () |
Reset for next rseg truncate. More... | |
space_id_t | get_scan_space_num () const |
Get the undo tablespace number to start a scan. More... | |
space_id_t | increment_scan () const |
Increment the scanning position in a round-robin fashion. More... | |
bool | is_equal (space_id_t space_id) const |
Check if the given space id is equal to the space ID that is marked for truncation. More... | |
int64_t | check_timer () const |
void | reset_timer () |
Reset the timer. More... | |
Private Attributes | |
space_id_t | m_space_id_marked |
UNDO space ID that is marked for truncate. More... | |
bool | m_marked_space_is_empty |
This is true if the marked space is empty of undo logs and ready to truncate. More... | |
ib::Timer | m_timer |
Elapsed time since last truncate check. More... | |
Static Private Attributes | |
static size_t | s_scan_pos |
Start scanning for UNDO tablespace from this vector position. More... | |
Track an UNDO tablespace marked for truncate.
|
inline |
Constructor.
|
default |
Destructor.
|
inline |
|
inline |
Get the ID of the tablespace marked for truncate.
|
inline |
Get the undo tablespace number to start a scan.
Re-adjust in case the spaces::size() went down.
|
inline |
Increment the scanning position in a round-robin fashion.
Round-robin way of selecting an undo tablespace for the truncate operation. Once we reach the end of the list of known undo tablespace IDs, move back to the first undo tablespace ID. This will scan active as well as inactive undo tablespaces.
|
inline |
Check if the given space id is equal to the space ID that is marked for truncation.
|
inline |
Is tablespace selected for truncate.
|
inline |
Is the tablespace selected for truncate empty of undo logs yet?
void undo::Truncate::mark | ( | Tablespace * | undo_space | ) |
Mark the tablespace for truncate.
[in] | undo_space | undo tablespace to truncate. |
|
inline |
Reset for next rseg truncate.
|
inline |
Reset the timer.
|
inline |
Mark the undo tablespace selected for truncate as empty so that it will be truncated next.
|
private |
This is true if the marked space is empty of undo logs and ready to truncate.
We leave the rsegs object 'inactive' until after it is truncated and rebuilt. This allow the code to do the check for undo logs only once.
|
private |
UNDO space ID that is marked for truncate.
|
private |
Elapsed time since last truncate check.
|
staticprivate |
Start scanning for UNDO tablespace from this vector position.
This is to avoid bias selection of one tablespace always.