MySQL 8.0.40
Source Code Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
arch0arch.cc File Reference

Common implementation for redo log and dirty page archiver system. More...

#include "arch0arch.h"
#include "os0thread-create.h"

Functions

bool arch_wake_threads ()
 Wakes up archiver threads. More...
 
void arch_remove_file (const char *file_path, const char *file_name)
 Remove files related to page and log archiving. More...
 
void arch_remove_dir (const char *dir_path, const char *dir_name)
 Remove group directory and the files related to page and log archiving. More...
 
dberr_t arch_init ()
 Initialize Page and Log archiver system. More...
 
void arch_free ()
 Free Page and Log archiver system. More...
 
int start_log_archiver_background ()
 Start log archiver background thread. More...
 
int start_page_archiver_background ()
 Start page archiver background thread. More...
 
void log_archiver_thread ()
 Archiver background thread. More...
 

Variables

Arch_Log_Sysarch_log_sys = nullptr
 Log Archiver system global. More...
 
Arch_Page_Sysarch_page_sys = nullptr
 Page Archiver system global. More...
 
os_event_t log_archiver_thread_event
 Event to signal the log archiver thread. More...
 

Detailed Description

Common implementation for redo log and dirty page archiver system.

Function Documentation

◆ arch_free()

void arch_free ( )

Free Page and Log archiver system.

◆ arch_init()

dberr_t arch_init ( )

Initialize Page and Log archiver system.

Returns
error code

◆ arch_remove_dir()

void arch_remove_dir ( const char *  dir_path,
const char *  dir_name 
)

Remove group directory and the files related to page and log archiving.

Parameters
[in]dir_pathpath to the directory
[in]dir_namedirectory name

◆ arch_remove_file()

void arch_remove_file ( const char *  file_path,
const char *  file_name 
)

Remove files related to page and log archiving.

Parameters
[in]file_pathpath to the file
[in]file_namename of the file

◆ arch_wake_threads()

bool arch_wake_threads ( )

Wakes up archiver threads.

Returns
true iff any thread was still alive

◆ log_archiver_thread()

void log_archiver_thread ( )

Archiver background thread.

Log archiver background thread.

◆ start_log_archiver_background()

int start_log_archiver_background ( )

Start log archiver background thread.

Returns
error code

◆ start_page_archiver_background()

int start_page_archiver_background ( )

Start page archiver background thread.

Returns
error code

Variable Documentation

◆ arch_log_sys

Arch_Log_Sys* arch_log_sys = nullptr

Log Archiver system global.

Redo log archiver system global.

◆ arch_page_sys

Arch_Page_Sys* arch_page_sys = nullptr

Page Archiver system global.

Dirty page ID archiver system global.

◆ log_archiver_thread_event

os_event_t log_archiver_thread_event

Event to signal the log archiver thread.

Archiver thread event to signal that data is available.