MySQL 8.0.39
Source Code Documentation
|
Special purpose iterators to be used when scanning the LRU list. More...
#include <buf0buf.h>
Public Member Functions | |
LRUItr (const buf_pool_t *buf_pool, const ib_mutex_t *mutex) | |
Constructor. More... | |
~LRUItr () override=default | |
Destructor. More... | |
buf_page_t * | start () |
Selects from where to start a scan. More... | |
Public Member Functions inherited from LRUHp | |
LRUHp (const buf_pool_t *buf_pool, const ib_mutex_t *mutex) | |
Constructor. More... | |
~LRUHp () override=default | |
Destructor. More... | |
void | adjust (const buf_page_t *bpage) override |
Adjust the value of hp. More... | |
Public Member Functions inherited from HazardPointer | |
HazardPointer (const buf_pool_t *buf_pool, const ib_mutex_t *mutex) | |
Constructor. More... | |
virtual | ~HazardPointer ()=default |
Destructor. More... | |
buf_page_t * | get () const |
Get current value. More... | |
void | set (buf_page_t *bpage) |
Set current value. More... | |
bool | is_hp (const buf_page_t *bpage) |
Checks if a bpage is the hp. More... | |
void | move (const buf_page_t *bpage, buf_page_t *dpage) |
Adjust the value of hp for moving. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from HazardPointer | |
HazardPointer (const HazardPointer &) | |
Disable copying. More... | |
HazardPointer & | operator= (const HazardPointer &) |
Protected Attributes inherited from HazardPointer | |
const buf_pool_t * | m_buf_pool |
Buffer pool instance. More... | |
const ib_mutex_t * | m_mutex |
mutex that protects access to the m_hp. More... | |
buf_page_t * | m_hp |
hazard pointer. More... | |
Special purpose iterators to be used when scanning the LRU list.
The idea is that when one thread finishes the scan it leaves the itr in that position and the other thread can start scan from there
|
inline |
Constructor.
buf_pool | buffer pool instance |
mutex | mutex that is protecting the hp. |
|
overridedefault |
Destructor.
buf_page_t * LRUItr::start | ( | ) |
Selects from where to start a scan.
If we have scanned too deep into the LRU list it resets the value to the tail of the LRU list.