MySQL 9.1.0
Source Code Documentation
Page_Arch_Client_Ctx Class Reference

Dirty page archiver client context. More...

#include <arch0page.h>

Public Member Functions

 Page_Arch_Client_Ctx (bool is_durable)
 Constructor: Initialize elements. More...
 
 ~Page_Arch_Client_Ctx ()
 Destructor. More...
 
int start (bool recovery, uint64_t *start_id)
 Start dirty page tracking and archiving. More...
 
int stop (uint64_t *stop_id)
 Stop dirty page tracking and archiving. More...
 
void release ()
 Release archived data so that system can purge it. More...
 
int init_during_recovery (Arch_Group *group, lsn_t last_lsn)
 Initialize context during recovery. More...
 
bool is_active () const
 Check if this client context is active. More...
 
int get_pages (Page_Arch_Cbk *cbk_func, void *cbk_ctx, byte *buff, uint buf_len)
 Get archived page Ids. More...
 
void print ()
 Print information related to the archiver client for debugging purposes. More...
 
 Page_Arch_Client_Ctx (Page_Arch_Client_Ctx const &)=delete
 Disable copy construction. More...
 
Page_Arch_Client_Ctxoperator= (Page_Arch_Client_Ctx const &)=delete
 Disable assignment. More...
 

Private Member Functions

void arch_client_mutex_enter ()
 Acquire client archiver mutex. More...
 
void arch_client_mutex_exit ()
 Release client archiver mutex. More...
 

Private Attributes

Arch_Client_State m_state {ARCH_CLIENT_STATE_INIT}
 Page archiver client state. More...
 
Arch_Groupm_group {nullptr}
 Archive group the client is attached to. More...
 
bool m_is_durable
 True if the client requires durablity. More...
 
lsn_t m_start_lsn {LSN_MAX}
 Start LSN for archived data. More...
 
lsn_t m_stop_lsn {LSN_MAX}
 Stop LSN for archived data. More...
 
lsn_t m_last_reset_lsn {LSN_MAX}
 Reset LSN at the time of last reset. More...
 
Arch_Page_Pos m_start_pos
 Start position for client in archived file group. More...
 
Arch_Page_Pos m_stop_pos
 Stop position for client in archived file group. More...
 
ib_mutex_t m_mutex
 Mutex protecting concurrent operation on data. More...
 

Detailed Description

Dirty page archiver client context.

Constructor & Destructor Documentation

◆ Page_Arch_Client_Ctx() [1/2]

Page_Arch_Client_Ctx::Page_Arch_Client_Ctx ( bool  is_durable)
inline

Constructor: Initialize elements.

Parameters
[in]is_durabletrue if the client requires durability, else false

◆ ~Page_Arch_Client_Ctx()

Page_Arch_Client_Ctx::~Page_Arch_Client_Ctx ( )
inline

Destructor.

◆ Page_Arch_Client_Ctx() [2/2]

Page_Arch_Client_Ctx::Page_Arch_Client_Ctx ( Page_Arch_Client_Ctx const &  )
delete

Disable copy construction.

Member Function Documentation

◆ arch_client_mutex_enter()

void Page_Arch_Client_Ctx::arch_client_mutex_enter ( )
inlineprivate

Acquire client archiver mutex.

It synchronizes members on concurrent start and stop operations.

◆ arch_client_mutex_exit()

void Page_Arch_Client_Ctx::arch_client_mutex_exit ( )
inlineprivate

Release client archiver mutex.

◆ get_pages()

int Page_Arch_Client_Ctx::get_pages ( Page_Arch_Cbk cbk_func,
void *  cbk_ctx,
byte buff,
uint  buf_len 
)

Get archived page Ids.

Attempt to read blocks directly from in memory buffer. If overwritten, copy from archived files.

Parameters
[in]cbk_funccalled repeatedly with page ID buffer
[in]cbk_ctxcallback function context
[in,out]buffbuffer to fill page IDs
[in]buf_lenbuffer length in bytes
Returns
error code

◆ init_during_recovery()

int Page_Arch_Client_Ctx::init_during_recovery ( Arch_Group group,
lsn_t  last_lsn 
)

Initialize context during recovery.

Parameters
[in]groupGroup which needs to be attached to the client
[in]last_lsnlast reset lsn
Returns
error code.

◆ is_active()

bool Page_Arch_Client_Ctx::is_active ( ) const
inline

Check if this client context is active.

Returns
true if active, else false

◆ operator=()

Page_Arch_Client_Ctx & Page_Arch_Client_Ctx::operator= ( Page_Arch_Client_Ctx const &  )
delete

Disable assignment.

◆ print()

void Page_Arch_Client_Ctx::print ( )

Print information related to the archiver client for debugging purposes.

◆ release()

void Page_Arch_Client_Ctx::release ( )

Release archived data so that system can purge it.

◆ start()

int Page_Arch_Client_Ctx::start ( bool  recovery,
uint64_t *  start_id 
)

Start dirty page tracking and archiving.

Parameters
[in]recoverytrue if the tracking is being started as part of recovery process
[out]start_idfill the start lsn
Returns
error code.

◆ stop()

int Page_Arch_Client_Ctx::stop ( uint64_t *  stop_id)

Stop dirty page tracking and archiving.

Parameters
[out]stop_idfill the stop lsn
Returns
error code.

Member Data Documentation

◆ m_group

Arch_Group* Page_Arch_Client_Ctx::m_group {nullptr}
private

Archive group the client is attached to.

◆ m_is_durable

bool Page_Arch_Client_Ctx::m_is_durable
private

True if the client requires durablity.

◆ m_last_reset_lsn

lsn_t Page_Arch_Client_Ctx::m_last_reset_lsn {LSN_MAX}
private

Reset LSN at the time of last reset.

◆ m_mutex

ib_mutex_t Page_Arch_Client_Ctx::m_mutex
private

Mutex protecting concurrent operation on data.

◆ m_start_lsn

lsn_t Page_Arch_Client_Ctx::m_start_lsn {LSN_MAX}
private

Start LSN for archived data.

◆ m_start_pos

Arch_Page_Pos Page_Arch_Client_Ctx::m_start_pos
private

Start position for client in archived file group.

◆ m_state

Arch_Client_State Page_Arch_Client_Ctx::m_state {ARCH_CLIENT_STATE_INIT}
private

Page archiver client state.

◆ m_stop_lsn

lsn_t Page_Arch_Client_Ctx::m_stop_lsn {LSN_MAX}
private

Stop LSN for archived data.

◆ m_stop_pos

Arch_Page_Pos Page_Arch_Client_Ctx::m_stop_pos
private

Stop position for client in archived file group.


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