CUBRID Engine
latest
|
Go to the source code of this file.
Classes | |
struct | double_write_slot |
Typedefs | |
typedef struct double_write_slot | DWB_SLOT |
Functions | |
bool | dwb_is_created (void) |
int | dwb_create (THREAD_ENTRY *thread_p, const char *dwb_path_p, const char *db_name_p) |
int | dwb_recreate (THREAD_ENTRY *thread_p) |
int | dwb_load_and_recover_pages (THREAD_ENTRY *thread_p, const char *dwb_path_p, const char *db_name_p) |
int | dwb_destroy (THREAD_ENTRY *thread_p) |
char * | dwb_get_volume_name (void) |
int | dwb_flush_force (THREAD_ENTRY *thread_p, bool *all_sync) |
int | dwb_read_page (THREAD_ENTRY *thread_p, const VPID *vpid, void *io_page, bool *success) |
int | dwb_set_data_on_next_slot (THREAD_ENTRY *thread_p, FILEIO_PAGE *io_page_p, bool can_wait, DWB_SLOT **p_dwb_slot) |
int | dwb_add_page (THREAD_ENTRY *thread_p, FILEIO_PAGE *io_page_p, VPID *vpid, DWB_SLOT **p_dwb_slot) |
typedef struct double_write_slot DWB_SLOT |
Definition at line 32 of file double_write_buffer.h.
int dwb_add_page | ( | THREAD_ENTRY * | thread_p, |
FILEIO_PAGE * | io_page_p, | ||
VPID * | vpid, | ||
DWB_SLOT ** | p_dwb_slot | ||
) |
Definition at line 2695 of file double_write_buffer.c.
References assert, assert_release, double_write_slot::block_no, double_write_block::block_no, double_write_buffer::blocks, double_write_block::count_wb_pages, DWB_BLOCK_NUM_PAGES, dwb_flush_block(), dwb_is_flush_block_daemon_available(), dwb_log, dwb_log_error, dwb_set_data_on_next_slot(), dwb_slots_hash_insert(), fileio_initialize_res(), double_write_slot::io_page, IO_PAGESIZE, NO_ERROR, NULL, vpid::pageid, double_write_slot::position_in_block, thread_get_thread_entry_info(), double_write_block::version, vpid::volid, double_write_slot::vpid, VPID_EQ, VPID_ISNULL, and VPID_SET_NULL.
Referenced by dwb_flush_force(), fileio_write_or_add_to_dwb(), and pgbuf_bcb_flush_with_wal().
int dwb_create | ( | THREAD_ENTRY * | thread_p, |
const char * | dwb_path_p, | ||
const char * | db_name_p | ||
) |
Definition at line 2821 of file double_write_buffer.c.
References dwb_create_internal(), dwb_ends_structure_modification(), DWB_IS_CREATED, dwb_log_error, dwb_starts_structure_modification(), dwb_Volume_name, fileio_make_dwb_name(), and NO_ERROR.
Referenced by boot_create_all_volumes(), and dwb_load_and_recover_pages().
int dwb_destroy | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 3299 of file double_write_buffer.c.
References dwb_destroy_internal(), dwb_ends_structure_modification(), DWB_IS_CREATED, dwb_starts_structure_modification(), and NO_ERROR.
Referenced by logpb_copy_database(), and xboot_shutdown_server().
int dwb_flush_force | ( | THREAD_ENTRY * | thread_p, |
bool * | all_sync | ||
) |
Definition at line 3414 of file double_write_buffer.c.
References assert, double_write_buffer::blocks, double_write_buffer::blocks_flush_counter, double_write_block::count_wb_pages, dwb_add_page(), DWB_BLOCK_NUM_PAGES, DWB_GET_BLOCK_NO_FROM_POSITION, DWB_GET_BLOCK_STATUS, DWB_IS_BLOCK_WRITE_STARTED, DWB_IS_CREATED, DWB_IS_MODIFYING_STRUCTURE, dwb_log, dwb_log_error, DWB_NOT_CREATED_OR_MODIFYING, DWB_NUM_TOTAL_BLOCKS, dwb_wait_for_block_completion(), dwb_wait_for_strucure_modification(), ER_CSS_PTHREAD_COND_TIMEDOUT, double_write_buffer::file_sync_helper_block, fileio_initialize_res(), IO_MAX_PAGE_SIZE, IO_PAGESIZE, MAX_ALIGNMENT, double_write_buffer::next_block_to_flush, NO_ERROR, NULL, NULL_PAGEID, NULL_VOLID, double_write_buffer::position_with_flags, PSTAT_DWB_FLUSH_FORCE_TIME_COUNTERS, PTR_ALIGN, thread_sleep(), and double_write_block::version.
Referenced by disk_format(), fileio_synchronize(), and fileio_synchronize_all().
char* dwb_get_volume_name | ( | void | ) |
Definition at line 3336 of file double_write_buffer.c.
References dwb_is_created(), dwb_Volume_name, and NULL.
bool dwb_is_created | ( | void | ) |
Definition at line 2805 of file double_write_buffer.c.
References DWB_IS_CREATED, and double_write_buffer::position_with_flags.
Referenced by dwb_flush_block(), dwb_get_volume_name(), dwb_read_page(), fileio_initialize_pages(), fileio_write_or_add_to_dwb(), fileio_write_restore(), fileio_writev(), logpb_archive_active_log(), logpb_copy_database(), logpb_write_page_to_disk(), logpb_write_toflush_pages_to_archive(), logpb_writev_append_pages(), and pgbuf_bcb_flush_with_wal().
int dwb_load_and_recover_pages | ( | THREAD_ENTRY * | thread_p, |
const char * | dwb_path_p, | ||
const char * | db_name_p | ||
) |
Definition at line 3095 of file double_write_buffer.c.
References assert, boot_db_full_name(), double_write_block::count_flush_volumes_info, double_write_block::count_wb_pages, dwb_block_create_ordered_slots(), dwb_check_data_page_is_sane(), dwb_check_logging, dwb_create(), dwb_create_blocks(), dwb_debug_check_dwb(), dwb_finalize_block(), dwb_log, dwb_log_error, dwb_Volume_name, dwb_write_block(), ER_FAILED, ER_IO_MOUNT_FAIL, fileio_dismount(), fileio_get_number_of_volume_pages(), fileio_is_volume_exist(), fileio_make_dwb_name(), fileio_mount(), fileio_read_pages(), FILEIO_SYNC_ONLY, fileio_synchronize(), fileio_unformat(), double_write_block::flush_volumes_info, free_and_init, i, double_write_slot::io_page, IO_PAGESIZE, IS_POWER_OF_2, LOG_DBDWB_VOLID, double_write_slot::lsa, fileio_page_reserved::lsa, LSA_COPY(), LSA_LE(), LSA_LT(), NO_ERROR, NULL, NULL_VOLDES, fileio_page_reserved::pageid, double_write_slot::position_in_block, fileio_page::prv, double_write_block::slots, flush_volume_info::vdes, double_write_buffer::vdes, fileio_page_reserved::volid, double_write_slot::vpid, VPID_EQ, VPID_ISNULL, VPID_SET, VPID_SET_NULL, and double_write_block::write_buffer.
Referenced by boot_restart_server().
int dwb_read_page | ( | THREAD_ENTRY * | thread_p, |
const VPID * | vpid, | ||
void * | io_page, | ||
bool * | success | ||
) |
Definition at line 3869 of file double_write_buffer.c.
References assert, assert_release, BO_IS_SERVER_RESTARTED, cubthread::manager::create_daemon(), cubthread::manager::destroy_daemon(), dwb_file_sync_helper(), dwb_flush_next_block(), dwb_is_created(), cubthread::lockfree_hashmap< Key, T >::find(), cubthread::get_manager(), double_write_slot::io_page, IO_PAGESIZE, dwb_slots_hash_entry::mutex, NO_ERROR, NULL, fileio_page_reserved::pageid, vpid::pageid, prm_get_bool_value(), PRM_ID_ENABLE_DWB_FLUSH_THREAD, fileio_page::prv, PSTAT_DWB_FLUSH_BLOCK_COND_WAIT, pthread_mutex_unlock, dwb_slots_hash_entry::slot, double_write_buffer::slots_hashmap, fileio_page_reserved::volid, vpid::volid, double_write_slot::vpid, and VPID_EQ.
Referenced by pgbuf_claim_bcb_for_fix().
int dwb_recreate | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 2863 of file double_write_buffer.c.
References dwb_create_internal(), dwb_destroy_internal(), dwb_ends_structure_modification(), DWB_IS_CREATED, dwb_starts_structure_modification(), dwb_Volume_name, NO_ERROR, and thread_get_thread_entry_info().
int dwb_set_data_on_next_slot | ( | THREAD_ENTRY * | thread_p, |
FILEIO_PAGE * | io_page_p, | ||
bool | can_wait, | ||
DWB_SLOT ** | p_dwb_slot | ||
) |
Definition at line 2657 of file double_write_buffer.c.
References assert, dwb_acquire_next_slot(), dwb_set_slot_data(), and NO_ERROR.
Referenced by dwb_add_page(), and pgbuf_bcb_flush_with_wal().