MySQL 8.3.0
Source Code Documentation
FlushHp Class Reference

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

#include <buf0buf.h>

Inheritance diagram for FlushHp:
[legend]

Public Member Functions

 FlushHp (const buf_pool_t *buf_pool, const ib_mutex_t *mutex)
 Constructor. More...
 
 ~FlushHp () 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->flush_list hazard pointer.

Constructor & Destructor Documentation

◆ FlushHp()

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

Constructor.

Parameters
buf_poolbuffer pool instance
mutexmutex that is protecting the hp.

◆ ~FlushHp()

FlushHp::~FlushHp ( )
overridedefault

Destructor.

Member Function Documentation

◆ adjust()

void FlushHp::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: