MySQL 8.0.40
Source Code Documentation
LRUHp Class Reference

Class implementing buf_pool->LRU hazard pointer. More...

#include <buf0buf.h>

Inheritance diagram for LRUHp:
[legend]

Public Member Functions

 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_tget () 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...
 
HazardPointeroperator= (const HazardPointer &)
 
- Protected Attributes inherited from HazardPointer
const buf_pool_tm_buf_pool
 Buffer pool instance. More...
 
const ib_mutex_t * m_mutex
 mutex that protects access to the m_hp. More...
 
buf_page_tm_hp
 hazard pointer. More...
 

Detailed Description

Class implementing buf_pool->LRU hazard pointer.

Constructor & Destructor Documentation

◆ LRUHp()

LRUHp::LRUHp ( const buf_pool_t buf_pool,
const ib_mutex_t *  mutex 
)
inline

Constructor.

Parameters
buf_poolbuffer pool instance
mutexmutex that is protecting the hp.

◆ ~LRUHp()

LRUHp::~LRUHp ( )
overridedefault

Destructor.

Member Function Documentation

◆ adjust()

void LRUHp::adjust ( const buf_page_t bpage)
overridevirtual

Adjust the value of hp.

This happens when some other thread working on the same list attempts to remove the hp from the list.

Parameters
bpagebuffer block to be compared

We only support reverse traversal for now.

Implements HazardPointer.


The documentation for this class was generated from the following files: