Track an UNDO tablespace marked for truncate.
More...
#include <trx0undo_trunc.h>
|
| static size_t | s_scan_pos |
| | Start scanning for UNDO tablespace from this vector position. More...
|
| |
Track an UNDO tablespace marked for truncate.
◆ Truncate()
| undo_truncate::Truncate::Truncate |
( |
| ) |
|
|
inline |
◆ ~Truncate()
| undo_truncate::Truncate::~Truncate |
( |
| ) |
|
|
default |
◆ check_timer()
| int64_t undo_truncate::Truncate::check_timer |
( |
| ) |
const |
|
inline |
- Returns
- the number of milliseconds since last reset.
◆ get_marked_space_num()
| space_id_t undo_truncate::Truncate::get_marked_space_num |
( |
| ) |
const |
|
inline |
Get the number of the tablespace marked for truncate.
- Returns
- tablespace number marked for truncate.
◆ get_scan_space_num()
| space_id_t undo_truncate::Truncate::get_scan_space_num |
( |
| ) |
const |
|
inline |
Get the undo tablespace number to start a scan.
Re-adjust in case the spaces::size() went down.
- Returns
- undo space_num to start scanning.
◆ increment_scan()
| space_id_t undo_truncate::Truncate::increment_scan |
( |
| ) |
const |
|
inline |
Increment the scanning position in a round-robin fashion.
- Returns
- undo space_num at incremented scanning position.
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.
◆ is_equal()
| bool undo_truncate::Truncate::is_equal |
( |
space_id_t |
space_id | ) |
const |
|
inline |
Check if the given space id is equal to the space ID that is marked for truncation.
- Returns
- true if they are equal, false otherwise.
◆ is_marked()
| bool undo_truncate::Truncate::is_marked |
( |
| ) |
const |
|
inline |
Is tablespace selected for truncate.
- Returns
- true if undo tablespace is marked for truncate
◆ is_marked_space_empty()
| bool undo_truncate::Truncate::is_marked_space_empty |
( |
| ) |
const |
|
inline |
Is the tablespace selected for truncate empty of undo logs yet?
- Returns
- true if the marked undo tablespace has no more undo logs
◆ mark()
| void undo_truncate::Truncate::mark |
( |
Tablespace * |
undo_space | ) |
|
Mark the tablespace for truncate.
- Parameters
-
| [in] | undo_space | undo tablespace to truncate. |
◆ reset()
| void undo_truncate::Truncate::reset |
( |
void |
| ) |
|
|
inline |
Reset for next rseg truncate.
◆ reset_timer()
| void undo_truncate::Truncate::reset_timer |
( |
| ) |
|
|
inline |
◆ set_marked_space_empty()
| void undo_truncate::Truncate::set_marked_space_empty |
( |
| ) |
|
|
inline |
Mark the undo tablespace selected for truncate as empty so that it will be truncated next.
◆ m_marked_space_is_empty
| bool undo_truncate::Truncate::m_marked_space_is_empty |
|
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.
◆ m_space_id_marked
| space_id_t undo_truncate::Truncate::m_space_id_marked |
|
private |
UNDO space ID that is marked for truncate.
◆ m_timer
Elapsed time since last truncate check.
◆ s_scan_pos
| size_t undo_truncate::Truncate::s_scan_pos |
|
staticprivate |
Start scanning for UNDO tablespace from this vector position.
This is to avoid bias selection of one tablespace always.
The documentation for this class was generated from the following files: