32#ifndef ARCH_PAGE_INCLUDE
33#define ARCH_PAGE_INCLUDE
188 int start(
bool recovery, uint64_t *start_id);
193 int stop(uint64_t *stop_id);
Common interface for redo log and dirty page archiver system.
constexpr uint ARCH_PAGE_BLK_SIZE
Memory block size.
Definition: arch0arch.h:90
Arch_Client_State
Archiver client state.
Definition: arch0arch.h:113
@ ARCH_CLIENT_STATE_INIT
Client is initialized.
Definition: arch0arch.h:115
@ ARCH_CLIENT_STATE_STARTED
Archiving started by client.
Definition: arch0arch.h:118
constexpr uint ARCH_PAGE_FILE_HEADER_RESET_POS_SIZE
Serialized Reset ID: Reset position total size.
Definition: arch0page.h:109
constexpr uint ARCH_DBLWR_NUM_FILES
Archive doublewrite buffer number of files.
Definition: arch0page.h:59
constexpr uint ARCH_PAGE_FILE_HEADER_RESET_BLOCK_OFFSET_SIZE
Serialized Reset ID: Reset block offset size.
Definition: arch0page.h:106
constexpr uint ARCH_PAGE_BLK_HEADER_RESET_LSN_OFFSET
Block Header: Reset LSN is in next 8 bytes.
Definition: arch0page.h:85
constexpr uint ARCH_PAGE_FILE_HDR_SIZE
Archived file header size.
Definition: arch0page.h:42
constexpr uint ARCH_BLK_SPCE_ID_OFFSET
Serialized page ID: tablespace ID in First 4 bytes.
Definition: arch0page.h:119
std::function< bool(void)> Page_Wait_Flush_Archiver_Cbk
Callback function to check if we need to wait for flush archiver to flush more blocks.
Definition: arch0page.h:166
constexpr uint ARCH_PAGE_BLK_HEADER_DATA_LEN_OFFSET
Block Header: Data length is in next 2 bytes.
Definition: arch0page.h:79
constexpr uint ARCH_PAGE_BLK_HEADER_VERSION_OFFSET
Block Header: Version is in first 1 byte.
Definition: arch0page.h:70
constexpr uint ARCH_BLK_PAGE_ID_SIZE
Serialized page ID: Total length.
Definition: arch0page.h:125
uint ARCH_PAGE_FILE_CAPACITY
Archived page file default size in number of blocks.
Definition: arch0page.cc:41
constexpr uint ARCH_PAGE_FILE_VERSION
Archived file format version.
Definition: arch0page.h:133
constexpr char ARCH_DBLWR_DIR[]
Archive doublewrite buffer directory prefix.
Definition: arch0page.h:49
constexpr uint ARCH_PAGE_BLK_HEADER_CHECKSUM_OFFSET
Block Header: Checksum is in next 4 bytes.
Definition: arch0page.h:76
constexpr uint ARCH_DBLWR_FILE_CAPACITY
Archive doublewrite buffer file capacity in no.
Definition: arch0page.h:62
int(void *ctx, byte *buff, uint num_pages) Page_Arch_Cbk
Callback for retrieving archived page IDs.
Definition: arch0page.h:162
constexpr uint ARCH_BLK_PAGE_NO_OFFSET
Serialized page ID: Page number in next 4 bytes.
Definition: arch0page.h:122
constexpr uint ARCH_PAGE_FILE_HEADER_RESET_BLOCK_NUM_SIZE
Serialized Reset ID: Reset block number size.
Definition: arch0page.h:103
constexpr char ARCH_DBLWR_FILE[]
Archive doublewrite buffer file prefix.
Definition: arch0page.h:52
constexpr uint ARCH_PAGE_FILE_HEADER_RESET_LSN_SIZE
Serialized Reset ID: Reset LSN total size.
Definition: arch0page.h:100
constexpr uint ARCH_PAGE_BLK_HEADER_TYPE_OFFSET
Block Header: Block Type is in next 1 byte.
Definition: arch0page.h:73
constexpr uint ARCH_PAGE_FILE_NUM_RESET_PAGE
Archived page header file size (RESET Page) in number of blocks.
Definition: arch0page.h:39
constexpr uint ARCH_PAGE_NUM_BLKS
Number of memory blocks.
Definition: arch0page.h:130
constexpr uint ARCH_PAGE_BLK_HEADER_STOP_LSN_OFFSET
Block Header: Stop LSN is in next 8 bytes.
Definition: arch0page.h:82
constexpr char ARCH_PAGE_GROUP_ACTIVE_FILE_NAME[]
File name for the active file which indicates whether a group is active or not.
Definition: arch0page.h:56
constexpr uint ARCH_PAGE_BLK_HEADER_NUMBER_OFFSET
Block Header: Block number is in next 8 bytes.
Definition: arch0page.h:88
uint ARCH_PAGE_FILE_DATA_CAPACITY
Archived page data file size (without header) in number of blocks.
Definition: arch0page.cc:45
constexpr uint ARCH_PAGE_RESET_THRESHOLD
Threshold for page archive reset.
Definition: arch0page.h:154
constexpr uint ARCH_PAGE_BLK_HEADER_LENGTH
Block Header: Total length.
Definition: arch0page.h:92
The database buffer pool high-level routines.
Contiguous archived data for redo log or page tracking.
Definition: arch0arch.h:847
Dirty page archiver client context.
Definition: arch0page.h:169
lsn_t m_start_lsn
Start LSN for archived data.
Definition: arch0page.h:250
Page_Arch_Client_Ctx(bool is_durable)
Constructor: Initialize elements.
Definition: arch0page.h:174
~Page_Arch_Client_Ctx()
Destructor.
Definition: arch0page.h:181
bool is_active() const
Check if this client context is active.
Definition: arch0page.h:206
void arch_client_mutex_exit()
Release client archiver mutex.
Definition: arch0page.h:237
Page_Arch_Client_Ctx(Page_Arch_Client_Ctx const &)=delete
Disable copy construction.
lsn_t m_stop_lsn
Stop LSN for archived data.
Definition: arch0page.h:253
void print()
Print information related to the archiver client for debugging purposes.
Definition: arch0page.cc:878
int get_pages(Page_Arch_Cbk *cbk_func, void *cbk_ctx, byte *buff, uint buf_len)
Get archived page Ids.
Definition: arch0page.cc:1010
Page_Arch_Client_Ctx & operator=(Page_Arch_Client_Ctx const &)=delete
Disable assignment.
bool m_is_durable
True if the client requires durablity.
Definition: arch0page.h:247
Arch_Page_Pos m_stop_pos
Stop position for client in archived file group.
Definition: arch0page.h:262
void arch_client_mutex_enter()
Acquire client archiver mutex.
Definition: arch0page.h:234
void release()
Release archived data so that system can purge it.
Definition: arch0page.cc:1082
Arch_Group * m_group
Archive group the client is attached to.
Definition: arch0page.h:244
ib_mutex_t m_mutex
Mutex protecting concurrent operation on data.
Definition: arch0page.h:265
int init_during_recovery(Arch_Group *group, lsn_t last_lsn)
Initialize context during recovery.
Definition: arch0page.cc:961
Arch_Page_Pos m_start_pos
Start position for client in archived file group.
Definition: arch0page.h:259
lsn_t m_last_reset_lsn
Reset LSN at the time of last reset.
Definition: arch0page.h:256
Arch_Client_State m_state
Page archiver client state.
Definition: arch0page.h:241
int start(bool recovery, uint64_t *start_id)
Start dirty page tracking and archiving.
Definition: arch0page.cc:892
int stop(uint64_t *stop_id)
Stop dirty page tracking and archiving.
Definition: arch0page.cc:978
constexpr lsn_t LSN_MAX
Maximum possible lsn value is slightly higher than the maximum sn value, because lsn sequence enumera...
Definition: log0constants.h:152
uint64_t lsn_t
Type used for all log sequence number storage and arithmetic.
Definition: log0types.h:62
Position in page ID archiving system.
Definition: arch0arch.h:298
void init()
Initialize a position.
Definition: arch0page.cc:1451
@ LATCH_ID_PAGE_ARCH_CLIENT
Definition: sync0types.h:390
unsigned int uint
Definition: uca-dump.cc:29
#define mutex_exit(M)
Definition: ut0mutex.h:122
#define mutex_free(M)
Definition: ut0mutex.h:124
#define mutex_enter(M)
Definition: ut0mutex.h:116
#define mutex_create(I, M)
Definition: ut0mutex.h:109