33#ifndef ARCH_PAGE_INCLUDE
34#define ARCH_PAGE_INCLUDE
189 int start(
bool recovery, uint64_t *start_id);
194 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:91
Arch_Client_State
Archiver client state.
Definition: arch0arch.h:114
@ ARCH_CLIENT_STATE_INIT
Client is initialized.
Definition: arch0arch.h:116
@ ARCH_CLIENT_STATE_STARTED
Archiving started by client.
Definition: arch0arch.h:119
constexpr uint ARCH_PAGE_FILE_HEADER_RESET_POS_SIZE
Serialized Reset ID: Reset position total size.
Definition: arch0page.h:110
constexpr uint ARCH_DBLWR_NUM_FILES
Archive doublewrite buffer number of files.
Definition: arch0page.h:60
constexpr uint ARCH_PAGE_FILE_HEADER_RESET_BLOCK_OFFSET_SIZE
Serialized Reset ID: Reset block offset size.
Definition: arch0page.h:107
constexpr uint ARCH_PAGE_BLK_HEADER_RESET_LSN_OFFSET
Block Header: Reset LSN is in next 8 bytes.
Definition: arch0page.h:86
constexpr uint ARCH_PAGE_FILE_HDR_SIZE
Archived file header size.
Definition: arch0page.h:43
constexpr uint ARCH_BLK_SPCE_ID_OFFSET
Serialized page ID: tablespace ID in First 4 bytes.
Definition: arch0page.h:120
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:167
constexpr uint ARCH_PAGE_BLK_HEADER_DATA_LEN_OFFSET
Block Header: Data length is in next 2 bytes.
Definition: arch0page.h:80
constexpr uint ARCH_PAGE_BLK_HEADER_VERSION_OFFSET
Block Header: Version is in first 1 byte.
Definition: arch0page.h:71
constexpr uint ARCH_BLK_PAGE_ID_SIZE
Serialized page ID: Total length.
Definition: arch0page.h:126
uint ARCH_PAGE_FILE_CAPACITY
Archived page file default size in number of blocks.
Definition: arch0page.cc:42
constexpr uint ARCH_PAGE_FILE_VERSION
Archived file format version.
Definition: arch0page.h:134
constexpr char ARCH_DBLWR_DIR[]
Archive doublewrite buffer directory prefix.
Definition: arch0page.h:50
constexpr uint ARCH_PAGE_BLK_HEADER_CHECKSUM_OFFSET
Block Header: Checksum is in next 4 bytes.
Definition: arch0page.h:77
constexpr uint ARCH_DBLWR_FILE_CAPACITY
Archive doublewrite buffer file capacity in no.
Definition: arch0page.h:63
int(void *ctx, byte *buff, uint num_pages) Page_Arch_Cbk
Callback for retrieving archived page IDs.
Definition: arch0page.h:163
constexpr uint ARCH_BLK_PAGE_NO_OFFSET
Serialized page ID: Page number in next 4 bytes.
Definition: arch0page.h:123
constexpr uint ARCH_PAGE_FILE_HEADER_RESET_BLOCK_NUM_SIZE
Serialized Reset ID: Reset block number size.
Definition: arch0page.h:104
constexpr char ARCH_DBLWR_FILE[]
Archive doublewrite buffer file prefix.
Definition: arch0page.h:53
constexpr uint ARCH_PAGE_FILE_HEADER_RESET_LSN_SIZE
Serialized Reset ID: Reset LSN total size.
Definition: arch0page.h:101
constexpr uint ARCH_PAGE_BLK_HEADER_TYPE_OFFSET
Block Header: Block Type is in next 1 byte.
Definition: arch0page.h:74
constexpr uint ARCH_PAGE_FILE_NUM_RESET_PAGE
Archived page header file size (RESET Page) in number of blocks.
Definition: arch0page.h:40
constexpr uint ARCH_PAGE_NUM_BLKS
Number of memory blocks.
Definition: arch0page.h:131
constexpr uint ARCH_PAGE_BLK_HEADER_STOP_LSN_OFFSET
Block Header: Stop LSN is in next 8 bytes.
Definition: arch0page.h:83
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:57
constexpr uint ARCH_PAGE_BLK_HEADER_NUMBER_OFFSET
Block Header: Block number is in next 8 bytes.
Definition: arch0page.h:89
uint ARCH_PAGE_FILE_DATA_CAPACITY
Archived page data file size (without header) in number of blocks.
Definition: arch0page.cc:46
constexpr uint ARCH_PAGE_RESET_THRESHOLD
Threshold for page archive reset.
Definition: arch0page.h:155
constexpr uint ARCH_PAGE_BLK_HEADER_LENGTH
Block Header: Total length.
Definition: arch0page.h:93
The database buffer pool high-level routines.
Contiguous archived data for redo log or page tracking.
Definition: arch0arch.h:843
Dirty page archiver client context.
Definition: arch0page.h:170
lsn_t m_start_lsn
Start LSN for archived data.
Definition: arch0page.h:251
Page_Arch_Client_Ctx(bool is_durable)
Constructor: Initialize elements.
Definition: arch0page.h:175
~Page_Arch_Client_Ctx()
Destructor.
Definition: arch0page.h:182
bool is_active() const
Check if this client context is active.
Definition: arch0page.h:207
void arch_client_mutex_exit()
Release client archiver mutex.
Definition: arch0page.h:238
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:254
void print()
Print information related to the archiver client for debugging purposes.
Definition: arch0page.cc:877
int get_pages(Page_Arch_Cbk *cbk_func, void *cbk_ctx, byte *buff, uint buf_len)
Get archived page Ids.
Definition: arch0page.cc:1009
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:248
Arch_Page_Pos m_stop_pos
Stop position for client in archived file group.
Definition: arch0page.h:263
void arch_client_mutex_enter()
Acquire client archiver mutex.
Definition: arch0page.h:235
void release()
Release archived data so that system can purge it.
Definition: arch0page.cc:1081
Arch_Group * m_group
Archive group the client is attached to.
Definition: arch0page.h:245
ib_mutex_t m_mutex
Mutex protecting concurrent operation on data.
Definition: arch0page.h:266
int init_during_recovery(Arch_Group *group, lsn_t last_lsn)
Initialize context during recovery.
Definition: arch0page.cc:960
Arch_Page_Pos m_start_pos
Start position for client in archived file group.
Definition: arch0page.h:260
lsn_t m_last_reset_lsn
Reset LSN at the time of last reset.
Definition: arch0page.h:257
Arch_Client_State m_state
Page archiver client state.
Definition: arch0page.h:242
int start(bool recovery, uint64_t *start_id)
Start dirty page tracking and archiving.
Definition: arch0page.cc:891
int stop(uint64_t *stop_id)
Stop dirty page tracking and archiving.
Definition: arch0page.cc:977
constexpr lsn_t LSN_MAX
Maximum possible lsn value is slightly higher than the maximum sn value, because lsn sequence enumera...
Definition: log0constants.h:159
uint64_t lsn_t
Type used for all log sequence number storage and arithmetic.
Definition: log0types.h:63
Position in page ID archiving system.
Definition: arch0arch.h:299
void init()
Initialize a position.
Definition: arch0page.cc:1441
@ LATCH_ID_PAGE_ARCH_CLIENT
Definition: sync0types.h:396
#define mutex_exit(M)
Definition: ut0mutex.h:123
#define mutex_free(M)
Definition: ut0mutex.h:125
#define mutex_enter(M)
Definition: ut0mutex.h:117
#define mutex_create(I, M)
Definition: ut0mutex.h:110