CUBRID Engine
latest
|
#include "config.h"
#include "storage_common.h"
#include "disk_manager.h"
#include "log_manager.h"
#include "oid.h"
#include "page_buffer.h"
#include "tde.h"
Go to the source code of this file.
Classes | |
struct | file_heap_des |
struct | file_ovf_heap_des |
struct | file_btree_des |
struct | file_ovf_btree_des |
struct | file_ehash_des |
struct | file_vacuum_data_des |
union | file_descriptors |
struct | file_tablespace |
Macros | |
#define | VFID_SET(vfid_ptr, volid_value, fileid_value) |
#define | VFID_SET_NULL(vfid_ptr) VFID_SET (vfid_ptr, NULL_VOLID, NULL_FILEID) |
#define | VFID_COPY(vfid_ptr1, vfid_ptr2) *(vfid_ptr1) = *(vfid_ptr2) |
#define | VFID_ISNULL(vfid_ptr) ((vfid_ptr)->fileid == NULL_FILEID) |
#define | VFID_EQ(vfid_ptr1, vfid_ptr2) |
#define | FILE_DESCRIPTORS_SIZE 64 |
Typedefs | |
typedef struct file_heap_des | FILE_HEAP_DES |
typedef struct file_ovf_heap_des | FILE_OVF_HEAP_DES |
typedef struct file_btree_des | FILE_BTREE_DES |
typedef struct file_ovf_btree_des | FILE_OVF_BTREE_DES |
typedef struct file_ehash_des | FILE_EHASH_DES |
typedef struct file_vacuum_data_des | FILE_VACUUM_DATA_DES |
typedef union file_descriptors | FILE_DESCRIPTORS |
typedef struct file_tablespace | FILE_TABLESPACE |
typedef int(* | FILE_INIT_PAGE_FUNC) (THREAD_ENTRY *thread_p, PAGE_PTR page, void *args) |
typedef int(* | FILE_MAP_PAGE_FUNC) (THREAD_ENTRY *thread_p, PAGE_PTR *page, bool *stop, void *args) |
Enumerations | |
enum | FILE_TYPE { FILE_TRACKER, FILE_HEAP, FILE_HEAP_REUSE_SLOTS, FILE_MULTIPAGE_OBJECT_HEAP, FILE_BTREE, FILE_BTREE_OVERFLOW_KEY, FILE_EXTENDIBLE_HASH, FILE_EXTENDIBLE_HASH_DIRECTORY, FILE_CATALOG, FILE_DROPPED_FILES, FILE_VACUUM_DATA, FILE_QUERY_AREA, FILE_TEMP, FILE_UNKNOWN_TYPE, FILE_LAST = FILE_UNKNOWN_TYPE } |
#define FILE_DESCRIPTORS_SIZE 64 |
Definition at line 128 of file file_manager.h.
#define VFID_COPY | ( | vfid_ptr1, | |
vfid_ptr2 | |||
) | *(vfid_ptr1) = *(vfid_ptr2) |
Definition at line 69 of file file_manager.h.
Referenced by btree_fix_root_for_insert(), catalog_initialize(), ehash_create_helper(), file_alloc(), file_dealloc(), file_tracker_create(), heap_dump(), heap_ovf_find_vfid(), heap_vacuum_all_objects(), prior_lsa_gen_undoredo_record_from_crumbs(), qexec_setup_list_id(), qfile_open_list(), vacuum_add_dropped_file(), vacuum_collect_heap_objects(), vacuum_heap(), vacuum_initialize(), vacuum_log_add_dropped_file(), vacuum_notify_all_workers_dropped_file(), vacuum_process_log_record(), and vacuum_rv_redo_add_dropped_file().
#define VFID_EQ | ( | vfid_ptr1, | |
vfid_ptr2 | |||
) |
Definition at line 75 of file file_manager.h.
Referenced by file_tempcache_check_duplicate(), file_tempcache_pop_tran_file(), file_tracker_interruptable_iterate(), file_tracker_item_reuse_heap(), vacuum_cleanup_collected_by_vfid(), vacuum_heap(), and vacuum_rv_replace_dropped_file().
#define VFID_ISNULL | ( | vfid_ptr | ) | ((vfid_ptr)->fileid == NULL_FILEID) |
Definition at line 72 of file file_manager.h.
Referenced by btree_check_all(), btree_check_by_btid(), btree_connect_page(), btree_first_oid(), btree_fix_root_for_insert(), btree_get_root_vpid_from_btid(), btree_key_online_index_tran_delete(), btree_repair_prev_link(), btree_store_overflow_key(), ehash_create_helper(), ehash_insert_helper(), file_alloc(), file_alloc_multiple(), file_alloc_sticky_first_page(), file_apply_tde_algorithm(), file_create(), file_create_temp_internal(), file_destroy(), file_get_type(), file_header_sanity_check(), file_is_temp(), file_map_pages(), file_numerable_find_nth(), file_rv_tracker_mark_heap_deleted_compensate_or_run_postpone(), file_temp_preserve(), file_tempcache_check_duplicate(), file_tempcache_put(), file_tracker_check(), file_tracker_interruptable_iterate(), file_tracker_load(), file_tracker_unregister(), heap_check_all_heaps(), heap_dump(), heap_get_header_page(), heap_ovf_delete(), heap_ovf_find_vfid(), log_can_skip_undo_logging(), overflow_insert(), overflow_update(), qfile_delete_list_cache_entry(), qfile_destroy_list(), qmgr_free_list_temp_file(), qmgr_free_temp_file_list(), qmgr_get_new_page(), session_preserve_temporary_files(), sort_add_new_file(), sort_checkalloc_numpages_of_outfiles(), vacuum_add_dropped_file(), vacuum_cleanup_dropped_files(), vacuum_data_load_and_recover(), vacuum_get_first_page_dropped_files(), vacuum_heap_get_hfid_and_file_type(), vacuum_heap_prepare_record(), vacuum_heap_record(), vacuum_load_dropped_files_from_disk(), vacuum_notify_all_workers_dropped_file(), vacuum_process_log_record(), vacuum_reset_data_after_copydb(), vacuum_rv_redo_add_dropped_file(), xbtree_delete_index(), xbtree_load_index(), xcache_check_recompilation_threshold(), xfile_apply_tde_to_class_files(), and xstats_get_statistics_from_server().
#define VFID_SET | ( | vfid_ptr, | |
volid_value, | |||
fileid_value | |||
) |
Definition at line 58 of file file_manager.h.
#define VFID_SET_NULL | ( | vfid_ptr | ) | VFID_SET (vfid_ptr, NULL_VOLID, NULL_FILEID) |
Definition at line 65 of file file_manager.h.
Referenced by boot_create_all_volumes(), btree_check_all(), btree_create_overflow_key_file(), btree_repair_prev_link(), ehash_create_helper(), file_create(), file_header_init(), file_tempcache_alloc_entry(), file_tempcache_get(), file_tracker_create(), file_tracker_interruptable_iterate(), file_tracker_item_reuse_heap(), heap_create_internal(), heap_get_hfid_from_vfid(), heap_reuse(), prior_lsa_gen_undoredo_record_from_crumbs(), qmgr_create_new_temp_file(), qmgr_create_result_file(), qmgr_free_list_temp_file(), qmgr_get_new_page(), sort_add_new_file(), sort_checkalloc_numpages_of_outfiles(), vacuum_heap_page(), vacuum_initialize(), vacuum_notify_all_workers_dropped_file(), vacuum_process_log_block(), vacuum_process_log_record(), xbtree_add_index(), xbtree_load_index(), and xbtree_load_online_index().
typedef struct file_btree_des FILE_BTREE_DES |
Definition at line 97 of file file_manager.h.
typedef union file_descriptors FILE_DESCRIPTORS |
Definition at line 129 of file file_manager.h.
typedef struct file_ehash_des FILE_EHASH_DES |
Definition at line 113 of file file_manager.h.
typedef struct file_heap_des FILE_HEAP_DES |
Definition at line 81 of file file_manager.h.
typedef int(* FILE_INIT_PAGE_FUNC) (THREAD_ENTRY *thread_p, PAGE_PTR page, void *args) |
Definition at line 151 of file file_manager.h.
typedef int(* FILE_MAP_PAGE_FUNC) (THREAD_ENTRY *thread_p, PAGE_PTR *page, bool *stop, void *args) |
Definition at line 152 of file file_manager.h.
typedef struct file_ovf_btree_des FILE_OVF_BTREE_DES |
Definition at line 105 of file file_manager.h.
typedef struct file_ovf_heap_des FILE_OVF_HEAP_DES |
Definition at line 89 of file file_manager.h.
typedef struct file_tablespace FILE_TABLESPACE |
Definition at line 142 of file file_manager.h.
typedef struct file_vacuum_data_des FILE_VACUUM_DATA_DES |
Definition at line 121 of file file_manager.h.
enum FILE_TYPE |
Definition at line 38 of file file_manager.h.
int file_alloc | ( | THREAD_ENTRY * | thread_p, |
const VFID * | vfid, | ||
FILE_INIT_PAGE_FUNC | f_init, | ||
void * | f_init_args, | ||
VPID * | vpid_out, | ||
PAGE_PTR * | page_out | ||
) |
Definition at line 5256 of file file_manager.c.
References ARG_FILE_LINE, assert, ASSERT_ERROR, ASSERT_ERROR_AND_SET, er_log_debug, FILE_ALLOC_USER_PAGE, FILE_GET_HEADER_VPID, file_get_tde_algorithm_internal(), FILE_HEAD_ALLOC_AS_ARGS, FILE_HEAD_ALLOC_MSG, file_header_sanity_check(), FILE_IS_NUMERABLE, FILE_IS_TEMPORARY, file_log, file_numerable_add_page(), file_perm_alloc(), FILE_PERM_TEMP_STRING, file_temp_alloc(), log_sysop_abort(), log_sysop_end_logical_undo(), log_sysop_start_atomic(), MAX_ALIGNMENT, NEW_PAGE, NO_ERROR, NULL, OLD_PAGE, PAGE_UNKNOWN, pgbuf_fix, pgbuf_get_page_ptype(), pgbuf_get_tde_algorithm(), PGBUF_LATCH_WRITE, pgbuf_set_tde_algorithm(), PGBUF_UNCONDITIONAL_LATCH, pgbuf_unfix, pgbuf_unfix_and_init, PTR_ALIGN, RVFL_ALLOC, file_header::self, TDE_ALGORITHM_NONE, tde_get_algorithm_name(), UNDO_DATA_SIZE, VFID_AS_ARGS, VFID_COPY, VFID_ISNULL, VPID_AS_ARGS, VPID_COPY, VPID_ISNULL, and VPID_SET_NULL.
Referenced by btree_get_new_page(), btree_load_new_page(), catalog_get_new_page(), ehash_create_helper(), ehash_insert_to_bucket_after_create(), ehash_split_bucket(), file_alloc_multiple(), file_alloc_sticky_first_page(), file_numerable_find_nth(), file_tracker_register_internal(), heap_alloc_new_page(), heap_vpid_alloc(), overflow_update(), qmgr_get_external_file_page(), sort_add_new_file(), vacuum_add_dropped_file(), vacuum_consume_buffer_log_blocks(), and vacuum_create_file_for_vacuum_data().
int file_alloc_multiple | ( | THREAD_ENTRY * | thread_p, |
const VFID * | vfid, | ||
FILE_INIT_PAGE_FUNC | f_init, | ||
void * | f_init_args, | ||
int | npages, | ||
VPID * | vpids_out | ||
) |
Definition at line 5442 of file file_manager.c.
References assert, ASSERT_ERROR, ASSERT_ERROR_AND_SET, file_alloc(), FILE_GET_HEADER_VPID, file_header_sanity_check(), FILE_IS_NUMERABLE, FILE_IS_TEMPORARY, log_check_system_op_is_started(), log_sysop_abort(), log_sysop_attach_to_outer(), log_sysop_start(), NO_ERROR, NULL, OLD_PAGE, pgbuf_fix, PGBUF_LATCH_WRITE, PGBUF_UNCONDITIONAL_LATCH, pgbuf_unfix, VFID_ISNULL, and VPID_INITIALIZER.
Referenced by ehash_expand_directory(), overflow_insert(), and sort_checkalloc_numpages_of_outfiles().
int file_alloc_sticky_first_page | ( | THREAD_ENTRY * | thread_p, |
const VFID * | vfid, | ||
FILE_INIT_PAGE_FUNC | f_init, | ||
void * | f_init_args, | ||
VPID * | vpid_out, | ||
PAGE_PTR * | page_out | ||
) |
Definition at line 5532 of file file_manager.c.
References assert, ASSERT_ERROR, ASSERT_ERROR_AND_SET, DONT_FREE, file_alloc(), FILE_GET_HEADER_VPID, file_header_sanity_check(), file_log, log_append_undoredo_data2(), file_header::n_page_user, NO_ERROR, NULL, OLD_PAGE, pgbuf_fix, pgbuf_get_lsa(), PGBUF_LATCH_WRITE, PGBUF_PAGE_MODIFY_ARGS, pgbuf_set_dirty(), PGBUF_UNCONDITIONAL_LATCH, pgbuf_unfix, RVFL_FHEAD_STICKY_PAGE, VFID_AS_ARGS, VFID_ISNULL, VPID_AS_ARGS, VPID_ISNULL, VPID_SET_NULL, and file_header::vpid_sticky_first.
Referenced by btree_create_file(), catalog_create(), file_tracker_create(), heap_create_internal(), and vacuum_create_file_for_dropped_files().
int file_apply_tde_algorithm | ( | THREAD_ENTRY * | thread_p, |
const VFID * | vfid, | ||
const TDE_ALGORITHM | tde_algo | ||
) |
Definition at line 5856 of file file_manager.c.
References ARG_FILE_LINE, file_map_context::args, assert, ASSERT_ERROR_AND_SET, db_private_free, er_log_debug, file_extdata_apply_funcs(), file_file_map_set_tde_algorithm(), FILE_GET_HEADER_VPID, file_get_tde_algorithm_internal(), FILE_HEADER_GET_FULL_FTAB, FILE_HEADER_GET_PART_FTAB, file_header_sanity_check(), FILE_IS_TEMPORARY, file_sector_map_pages(), file_set_tde_algorithm(), file_table_collect_ftab_pages(), file_map_context::ftab_collector, file_map_context::func, file_map_context::is_partial, file_map_context::latch_cond, file_map_context::latch_mode, file_header::n_page_user, NO_ERROR, NULL, OLD_PAGE, file_ftab_collector::partsect_ftab, pgbuf_fix, PGBUF_LATCH_WRITE, PGBUF_UNCONDITIONAL_LATCH, pgbuf_unfix, file_header::self, file_set_tde_algorithm_args::skip_logging, file_map_context::stop, file_set_tde_algorithm_args::tde_algo, TDE_ALGORITHM_NONE, tde_get_algorithm_name(), VFID_AS_ARGS, and VFID_ISNULL.
Referenced by btree_create_file(), btree_create_overflow_key_file(), heap_create_internal(), heap_ovf_find_vfid(), qmgr_create_result_file(), qmgr_get_new_page(), sort_add_new_file(), sort_inphase_sort(), and xfile_apply_tde_to_class_files().
DISK_ISVALID file_check_vpid | ( | THREAD_ENTRY * | thread_p, |
const VFID * | vfid, | ||
const VPID * | vpid_lookup | ||
) |
Definition at line 6679 of file file_manager.c.
References assert, ASSERT_ERROR, assert_release, disk_compare_vsids(), DISK_ERROR, DISK_INVALID, DISK_VALID, file_compare_vpids(), file_extdata_at(), file_extdata_search_item(), FILE_GET_HEADER_VPID, FILE_HEADER_GET_FULL_FTAB, FILE_HEADER_GET_PART_FTAB, FILE_HEADER_GET_USER_PAGE_FTAB, file_header_sanity_check(), FILE_IS_NUMERABLE, file_partsect_is_bit_set(), file_partsect_pageid_to_offset(), FILE_USER_PAGE_IS_MARKED_DELETED, NO_ERROR, NULL, OLD_PAGE, vpid::pageid, pgbuf_fix, PGBUF_LATCH_READ, PGBUF_UNCONDITIONAL_LATCH, pgbuf_unfix, pgbuf_unfix_and_init, and VSID_FROM_VPID.
Referenced by btree_check_pages(), catalog_check_class_consistency(), heap_check_all_pages(), and heap_check_all_pages_by_heapchain().
int file_create | ( | THREAD_ENTRY * | thread_p, |
FILE_TYPE | file_type, | ||
FILE_TABLESPACE * | tablespace, | ||
FILE_DESCRIPTORS * | des, | ||
bool | is_temp, | ||
bool | is_numerable, | ||
VFID * | vfid | ||
) |
Definition at line 3295 of file file_manager.c.
References ARG_FILE_LINE, assert, ASSERT_ERROR, ASSERT_ERROR_AND_SET, assert_release, CEIL_PTVDIV, DB_ALIGN, DB_PAGESIZE, DB_PERMANENT_DATA_PURPOSE, db_private_alloc, db_private_free, DB_SECTORSIZE, DB_TEMPORARY_DATA_PURPOSE, file_header::descriptor, disk_compare_vsids(), disk_reserve_sectors(), DISK_SECTOR_NPAGES, DISK_UNKNOWN_PURPOSE, disk_unreserve_ordered_sectors(), ER_ERROR_SEVERITY, ER_FAILED, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), FILE_BTREE, FILE_EMPTY_PAGE_BITMAP, file_extdata_append(), file_extdata_at(), file_extdata_end(), file_extdata_init(), file_extdata_is_empty(), file_extdata_is_full(), file_extdata_item_count(), file_extdata_max_size(), file_extdata_remove_at(), file_extdata_size(), file_extdata_start(), FILE_FLAG_NUMERABLE, FILE_FLAG_TEMPORARY, file_header::file_flags, FILE_HEAD_FULL_AS_ARGS, FILE_HEAD_FULL_MSG, FILE_HEADER_ALIGNED_SIZE, FILE_HEADER_GET_FULL_FTAB, FILE_HEADER_GET_PART_FTAB, FILE_HEADER_GET_USER_PAGE_FTAB, file_header_sanity_check(), FILE_HEAP, FILE_HEAP_REUSE_SLOTS, file_log, FILE_NUMERABLE_REGULAR_STRING, file_partsect_is_bit_set(), file_partsect_is_full(), file_partsect_pageid_to_offset(), file_partsect_set_bit(), FILE_PERM_TEMP_STRING, FILE_TABLESPACE_AS_ARGS, FILE_TABLESPACE_MSG, FILE_TEMP, FILE_TRACKER, file_tracker_register(), file_type_to_string(), vfid::fileid, file_header::first_index_find_nth_last, FREE, i, file_tablespace::initial_size, log_sysop_abort(), log_sysop_end_logical_undo(), log_sysop_start(), logtb_get_current_mvccid(), logtb_set_check_interrupt(), MAX_ALIGNMENT, file_header::n_page_free, file_header::n_page_ftab, file_header::n_page_mark_delete, file_header::n_page_total, file_header::n_page_user, file_header::n_sector_empty, file_header::n_sector_full, file_header::n_sector_partial, file_header::n_sector_total, NEW_PAGE, spacedb_files::nfile, NO_ERROR, spacedb_files::npage_ftab, spacedb_files::npage_reserved, spacedb_files::npage_user, NULL, NULL_OFFSET, NULL_VOLID, file_header::offset_to_full_ftab, file_header::offset_to_last_temp_alloc, file_header::offset_to_partial_ftab, file_header::offset_to_user_page_ftab, file_partial_sector::page_bitmap, PAGE_FTAB, vpid::pageid, pgbuf_fix, PGBUF_LATCH_WRITE, pgbuf_log_new_page(), pgbuf_set_dirty(), pgbuf_set_dirty_and_free, pgbuf_set_page_ptype(), PGBUF_UNCONDITIONAL_LATCH, pgbuf_unfix, pgbuf_unfix_and_init, file_header::reserved0, file_header::reserved1, file_header::reserved2, file_header::reserved3, RVFL_DESTROY, vsid::sectid, SECTOR_FIRST_PAGEID, SECTOR_FROM_PAGEID, SECTOR_LAST_PAGEID, file_header::self, file_tempcache::spacedb_temp, file_header::tablespace, file_header::time_creation, file_header::type, vacuum_is_file_dropped(), VFID_AS_ARGS, VFID_INITIALIZER, VFID_ISNULL, VFID_SET_NULL, vpid::volid, vfid::volid, vsid::volid, file_header::volid_last_expand, VPID_COPY, VPID_EQ, file_header::vpid_find_nth_last, VPID_INITIALIZER, file_header::vpid_last_temp_alloc, file_header::vpid_last_user_page_ftab, file_extensible_data::vpid_next, VPID_SET_NULL, file_header::vpid_sticky_first, file_partial_sector::vsid, and VSID_IS_SECTOR_OF_VPID.
Referenced by file_create_ehash(), file_create_ehash_dir(), file_create_temp_internal(), and file_create_with_npages().
int file_create_ehash | ( | THREAD_ENTRY * | thread_p, |
int | npages, | ||
bool | is_tmp, | ||
FILE_EHASH_DES * | des_ehash, | ||
VFID * | vfid | ||
) |
Definition at line 3245 of file file_manager.c.
References assert, file_create(), FILE_EXTENDIBLE_HASH, FILE_TABLESPACE_FOR_TEMP_NPAGES, and file_header::tablespace.
Referenced by ehash_create_helper().
int file_create_ehash_dir | ( | THREAD_ENTRY * | thread_p, |
int | npages, | ||
bool | is_tmp, | ||
FILE_EHASH_DES * | des_ehash, | ||
VFID * | vfid | ||
) |
Definition at line 3269 of file file_manager.c.
References assert, file_create(), FILE_EXTENDIBLE_HASH_DIRECTORY, FILE_TABLESPACE_FOR_TEMP_NPAGES, and file_header::tablespace.
Referenced by ehash_create_helper().
int file_create_heap | ( | THREAD_ENTRY * | thread_p, |
bool | reuse_oid, | ||
const OID * | class_oid, | ||
VFID * | vfid | ||
) |
Definition at line 3122 of file file_manager.c.
References assert, file_heap_des::class_oid, file_create_with_npages(), FILE_HEAP, FILE_HEAP_REUSE_SLOTS, file_descriptors::heap, NULL, and STATIC_INLINE.
Referenced by heap_create_internal().
int file_create_query_area | ( | THREAD_ENTRY * | thread_p, |
VFID * | vfid | ||
) |
Definition at line 3228 of file file_manager.c.
References file_create_temp_internal(), and FILE_QUERY_AREA.
Referenced by qmgr_create_result_file().
int file_create_temp | ( | THREAD_ENTRY * | thread_p, |
int | npages, | ||
VFID * | vfid | ||
) |
Definition at line 3201 of file file_manager.c.
References file_create_temp_internal(), and FILE_TEMP.
Referenced by qmgr_get_new_page(), and sort_inphase_sort().
int file_create_temp_numerable | ( | THREAD_ENTRY * | thread_p, |
int | npages, | ||
VFID * | vfid | ||
) |
Definition at line 3215 of file file_manager.c.
References file_create_temp_internal(), and FILE_TEMP.
Referenced by sort_add_new_file().
int file_create_with_npages | ( | THREAD_ENTRY * | thread_p, |
FILE_TYPE | file_type, | ||
int | npages, | ||
FILE_DESCRIPTORS * | des, | ||
VFID * | vfid | ||
) |
Definition at line 3097 of file file_manager.c.
References assert, file_create(), FILE_TABLESPACE_FOR_PERM_NPAGES, FILE_TEMP, and file_header::tablespace.
Referenced by btree_create_file(), btree_create_overflow_key_file(), catalog_create(), file_create_heap(), file_tracker_create(), heap_ovf_find_vfid(), vacuum_create_file_for_dropped_files(), and vacuum_create_file_for_vacuum_data().
int file_dealloc | ( | THREAD_ENTRY * | thread_p, |
const VFID * | vfid, | ||
const VPID * | vpid, | ||
FILE_TYPE | file_type_hint | ||
) |
Definition at line 5972 of file file_manager.c.
References assert, ASSERT_ERROR, ASSERT_ERROR_AND_SET, assert_release, DONT_FREE, ER_FAILED, FILE_CACHE_LAST_FIND_NTH, file_compare_vpids(), file_extdata_at(), file_extdata_search_item(), FILE_EXTENDIBLE_HASH, FILE_EXTENDIBLE_HASH_DIRECTORY, FILE_HEADER_GET_USER_PAGE_FTAB, file_header_update_mark_deleted(), FILE_HEAP, FILE_HEAP_REUSE_SLOTS, FILE_IS_NUMERABLE, FILE_IS_TEMPORARY, file_log, FILE_TEMP, FILE_TYPE_CAN_BE_NUMERABLE, file_type_to_string(), FILE_UNKNOWN_TYPE, FILE_USER_PAGE_IS_MARKED_DELETED, FILE_USER_PAGE_MARK_DELETED, vfid::fileid, file_header::first_index_find_nth_last, log_append_postpone(), log_append_undoredo_data(), LOG_DATA_ADDR_INITIALIZER, LOG_DATA_SIZE, MAX_ALIGNMENT, NO_ERROR, NULL, log_data_addr::offset, OLD_PAGE, vpid::pageid, pgbuf_fix, pgbuf_get_lsa(), PGBUF_LATCH_WRITE, PGBUF_PAGE_MODIFY_ARGS, pgbuf_set_dirty(), PGBUF_UNCONDITIONAL_LATCH, pgbuf_unfix, log_data_addr::pgptr, PTR_ALIGN, RVFL_DEALLOC, RVFL_USER_PAGE_MARK_DELETE, file_header::self, file_header::type, VFID_AS_ARGS, VFID_COPY, vpid::volid, vfid::volid, VPID_AS_ARGS, VPID_COPY, VPID_EQ, file_header::vpid_find_nth_last, VPID_SET_NULL, and file_header::vpid_sticky_first.
Referenced by btree_merge_node_and_advance(), btree_overflow_remove_object(), catalog_drop_representation_helper(), catalog_reclaim_space(), catalog_rv_ovf_page_logical_insert_undo(), ehash_merge(), ehash_split_bucket(), file_numerable_truncate(), file_rv_tracker_mark_heap_deleted_compensate_or_run_postpone(), file_tracker_unregister(), heap_remove_page_on_vacuum(), heap_vpid_remove(), overflow_delete_internal(), overflow_update(), and vacuum_data_empty_page().
int file_descriptor_dump | ( | THREAD_ENTRY * | thread_p, |
const VFID * | vfid, | ||
FILE * | fp | ||
) |
Definition at line 11471 of file file_manager.c.
References ASSERT_ERROR_AND_SET, FILE_GET_HEADER_VPID, file_header_dump_descriptor(), file_header_sanity_check(), NO_ERROR, NULL, OLD_PAGE, pgbuf_fix, PGBUF_LATCH_READ, PGBUF_UNCONDITIONAL_LATCH, and pgbuf_unfix.
Referenced by heap_dump().
int file_descriptor_get | ( | THREAD_ENTRY * | thread_p, |
const VFID * | vfid, | ||
FILE_DESCRIPTORS * | desc_out | ||
) |
Definition at line 11403 of file file_manager.c.
References ASSERT_ERROR_AND_SET, file_header::descriptor, FILE_GET_HEADER_VPID, file_header_sanity_check(), NO_ERROR, NULL, OLD_PAGE, pgbuf_fix, PGBUF_LATCH_READ, PGBUF_UNCONDITIONAL_LATCH, and pgbuf_unfix.
Referenced by btree_check_by_btid(), btree_dump_capacity(), btree_fix_ovfl_oid_pages_by_btid(), heap_capacity_next_scan(), heap_check_heap_file(), heap_dump(), heap_dump_capacity(), vacuum_data_load_and_recover(), vacuum_heap_get_hfid_and_file_type(), and vacuum_reset_data_after_copydb().
int file_descriptor_update | ( | THREAD_ENTRY * | thread_p, |
const VFID * | vfid, | ||
void * | des_new | ||
) |
Definition at line 11435 of file file_manager.c.
References ASSERT_ERROR_AND_SET, file_header::descriptor, FILE_GET_HEADER_VPID, file_header_sanity_check(), FREE, log_append_undoredo_data2(), NO_ERROR, NULL, OLD_PAGE, pgbuf_fix, PGBUF_LATCH_WRITE, pgbuf_set_dirty(), PGBUF_UNCONDITIONAL_LATCH, and RVFL_FILEDESC_UPD.
Referenced by heap_create_internal(), vacuum_create_file_for_vacuum_data(), and vacuum_data_empty_page().
int file_destroy | ( | THREAD_ENTRY * | thread_p, |
const VFID * | vfid, | ||
bool | is_temp | ||
) |
Definition at line 4041 of file file_manager.c.
References ARG_FILE_LINE, assert, ASSERT_ERROR, ASSERT_ERROR_AND_SET, assert_release, DB_PERMANENT_DATA_PURPOSE, db_private_alloc, db_private_free, DB_TEMPORARY_DATA_PURPOSE, DISK_SECTOR_NPAGES, disk_unreserve_ordered_sectors(), ER_ERROR_SEVERITY, ER_FAILED, er_log_debug, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), file_extdata_apply_funcs(), file_extdata_collect_ftab_pages(), FILE_GET_HEADER_VPID, file_get_tde_algorithm_internal(), FILE_HEAD_FULL_AS_ARGS, FILE_HEAD_FULL_MSG, FILE_HEADER_GET_FULL_FTAB, FILE_HEADER_GET_PART_FTAB, FILE_IS_TEMPORARY, file_log, file_partsect_is_bit_set(), file_sector_map_dealloc(), file_table_collect_all_vsids(), file_tracker_unregister(), log_check_system_op_is_started(), logtb_set_check_interrupt(), file_header::n_page_free, file_header::n_page_ftab, file_header::n_page_user, file_header::n_sector_total, file_vsid_collector::n_vsids, spacedb_files::nfile, NO_ERROR, spacedb_files::npage_ftab, spacedb_files::npage_reserved, spacedb_files::npage_user, file_ftab_collector::npages, file_ftab_collector::nsects, NULL, OLD_PAGE, vpid::pageid, file_ftab_collector::partsect_ftab, pgbuf_dealloc_page(), pgbuf_fix, PGBUF_LATCH_WRITE, PGBUF_UNCONDITIONAL_LATCH, pgbuf_unfix, pgbuf_unfix_and_init, vsid::sectid, SECTOR_FIRST_PAGEID, file_header::self, file_tempcache::spacedb_temp, TDE_ALGORITHM_NONE, tde_get_algorithm_name(), VFID_AS_ARGS, VFID_ISNULL, vpid::volid, vsid::volid, file_partial_sector::vsid, and file_vsid_collector::vsids.
Referenced by ehash_create_helper(), file_rv_destroy(), file_rv_tracker_mark_heap_deleted_compensate_or_run_postpone(), file_temp_retire_internal(), file_tempcache_cache_or_drop_entries(), and xehash_destroy().
int file_dump | ( | THREAD_ENTRY * | thread_p, |
const VFID * | vfid, | ||
FILE * | fp | ||
) |
Definition at line 7386 of file file_manager.c.
References ASSERT_ERROR, ASSERT_ERROR_AND_SET, FILE_GET_HEADER_VPID, file_header_dump(), file_table_dump(), NO_ERROR, NULL, OLD_PAGE, pgbuf_fix, PGBUF_LATCH_READ, PGBUF_UNCONDITIONAL_LATCH, pgbuf_unfix, STATIC_INLINE, and VFID_AS_ARGS.
Referenced by file_tracker_item_dump(), and heap_dump().
int file_get_num_user_pages | ( | THREAD_ENTRY * | thread_p, |
const VFID * | vfid, | ||
int * | n_user_pages_out | ||
) |
Definition at line 6645 of file file_manager.c.
References ASSERT_ERROR_AND_SET, FILE_GET_HEADER_VPID, file_header_sanity_check(), file_header::n_page_user, NO_ERROR, NULL, OLD_PAGE, pgbuf_fix, PGBUF_LATCH_READ, PGBUF_UNCONDITIONAL_LATCH, and pgbuf_unfix.
Referenced by btree_get_stats(), catalog_dump(), catalog_reclaim_space(), ehash_dump(), ehash_expand_directory(), ehash_map(), ehash_shrink_directory(), heap_check_all_pages(), sort_checkalloc_numpages_of_outfiles(), xcache_check_recompilation_threshold(), xstats_get_statistics_from_server(), and xstats_update_statistics().
int file_get_sticky_first_page | ( | THREAD_ENTRY * | thread_p, |
const VFID * | vfid, | ||
VPID * | vpid_out | ||
) |
Definition at line 5630 of file file_manager.c.
References ASSERT_ERROR_AND_SET, assert_release, ER_FAILED, FILE_GET_HEADER_VPID, file_header_sanity_check(), LOG_ISRESTARTED, NO_ERROR, NULL, OLD_PAGE, pgbuf_fix, PGBUF_LATCH_READ, PGBUF_UNCONDITIONAL_LATCH, pgbuf_unfix, VPID_ISNULL, and file_header::vpid_sticky_first.
Referenced by btree_get_btid_from_file(), file_tracker_item_reuse_heap(), file_tracker_load(), heap_get_header_page(), and vacuum_get_first_page_dropped_files().
int file_get_tde_algorithm | ( | THREAD_ENTRY * | thread_p, |
const VFID * | vfid, | ||
PGBUF_LATCH_CONDITION | fix_head_cond, | ||
TDE_ALGORITHM * | tde_algo | ||
) |
Definition at line 5782 of file file_manager.c.
References ER_FAILED, FILE_GET_HEADER_VPID, file_get_tde_algorithm_internal(), NO_ERROR, NULL, OLD_PAGE, pgbuf_fix, PGBUF_LATCH_READ, and pgbuf_unfix.
Referenced by log_append_sysop_end(), and sort_write_area().
int file_get_tran_num_temp_files | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 9494 of file file_manager.c.
References file_get_tempcache_entry_index(), file_tempcache_entry::next, NULL, STATIC_INLINE, and file_tempcache::tran_files.
Referenced by file_tempcache_drop_tran_temp_files(), and logtb_descriptors_start_scan().
int file_get_type | ( | THREAD_ENTRY * | thread_p, |
const VFID * | vfid, | ||
FILE_TYPE * | ftype_out | ||
) |
Definition at line 6817 of file file_manager.c.
References assert, ASSERT_ERROR_AND_SET, FILE_GET_HEADER_VPID, file_header_sanity_check(), FILE_UNKNOWN_TYPE, NO_ERROR, NULL, OLD_PAGE, pgbuf_fix, PGBUF_LATCH_READ, PGBUF_UNCONDITIONAL_LATCH, pgbuf_unfix, file_header::type, and VFID_ISNULL.
Referenced by heap_check_heap_file(), heap_hfid_cache_get(), heap_scancache_reset_modify(), heap_scancache_start_internal(), vacuum_heap_get_hfid_and_file_type(), and xheap_destroy_newly_created().
int file_init_page_type | ( | THREAD_ENTRY * | thread_p, |
PAGE_PTR | page, | ||
void * | args | ||
) |
Definition at line 5200 of file file_manager.c.
References file_init_page_type_internal().
Referenced by ehash_create_helper(), heap_create_internal(), overflow_insert(), overflow_update(), vacuum_add_dropped_file(), vacuum_consume_buffer_log_blocks(), vacuum_create_file_for_dropped_files(), and vacuum_create_file_for_vacuum_data().
int file_init_temp_page_type | ( | THREAD_ENTRY * | thread_p, |
PAGE_PTR | page, | ||
void * | args | ||
) |
Definition at line 5216 of file file_manager.c.
References file_init_page_type_internal(), and STATIC_INLINE.
Referenced by ehash_create_helper(), and overflow_insert().
int file_is_temp | ( | THREAD_ENTRY * | thread_p, |
const VFID * | vfid, | ||
bool * | is_temp | ||
) |
Definition at line 6857 of file file_manager.c.
References assert, ASSERT_ERROR_AND_SET, FILE_GET_HEADER_VPID, file_header_sanity_check(), FILE_IS_TEMPORARY, NO_ERROR, NULL, OLD_PAGE, pgbuf_fix, PGBUF_LATCH_READ, PGBUF_UNCONDITIONAL_LATCH, pgbuf_unfix, STATIC_INLINE, and VFID_ISNULL.
Referenced by ehash_delete(), and ehash_insert_helper().
void file_manager_final | ( | void | ) |
Definition at line 869 of file file_manager.c.
References file_tempcache_final(), and STATIC_INLINE.
Referenced by logtb_undefine_trantable().
int file_manager_init | ( | void | ) |
int file_map_pages | ( | THREAD_ENTRY * | thread_p, |
const VFID * | vfid, | ||
PGBUF_LATCH_MODE | latch_mode, | ||
PGBUF_LATCH_CONDITION | latch_cond, | ||
FILE_MAP_PAGE_FUNC | func, | ||
void * | args | ||
) |
Definition at line 7164 of file file_manager.c.
References file_map_context::args, assert, ASSERT_ERROR, ASSERT_ERROR_AND_SET, db_private_free, file_extdata_apply_funcs(), FILE_GET_HEADER_VPID, FILE_HEADER_GET_FULL_FTAB, FILE_HEADER_GET_PART_FTAB, file_header_sanity_check(), FILE_IS_TEMPORARY, file_sector_map_pages(), file_table_collect_ftab_pages(), file_map_context::ftab_collector, file_map_context::func, file_map_context::is_partial, file_map_context::latch_cond, file_map_context::latch_mode, NO_ERROR, NULL, OLD_PAGE, file_ftab_collector::partsect_ftab, PGBUF_CONDITIONAL_LATCH, pgbuf_fix, PGBUF_LATCH_READ, PGBUF_LATCH_WRITE, PGBUF_UNCONDITIONAL_LATCH, pgbuf_unfix, file_map_context::stop, and VFID_ISNULL.
Referenced by catalog_dump(), catalog_find_optimal_page(), catalog_reclaim_space(), and heap_check_all_pages_by_heapchain().
int file_numerable_find_nth | ( | THREAD_ENTRY * | thread_p, |
const VFID * | vfid, | ||
int | nth, | ||
bool | auto_alloc, | ||
FILE_INIT_PAGE_FUNC | f_init, | ||
void * | f_init_args, | ||
VPID * | vpid_nth | ||
) |
Definition at line 7956 of file file_manager.c.
References assert, ASSERT_ERROR, ASSERT_ERROR_AND_SET, assert_release, ER_FAILED, ER_PAGE_LATCH_PROMOTE_FAIL, file_alloc(), FILE_CACHE_LAST_FIND_NTH, file_extdata_apply_funcs(), file_extdata_find_nth_vpid(), file_extdata_find_nth_vpid_and_skip_marked(), FILE_GET_HEADER_VPID, FILE_HEADER_GET_USER_PAGE_FTAB, file_header_sanity_check(), FILE_IS_NUMERABLE, file_log, file_find_nth_context::first_index, file_header::first_index_find_nth_last, file_header::n_page_mark_delete, file_header::n_page_user, NO_ERROR, file_find_nth_context::nth, NULL, OLD_PAGE, pgbuf_fix, pgbuf_get_vpid(), PGBUF_LATCH_READ, PGBUF_LATCH_WRITE, pgbuf_promote_read_latch, PGBUF_PROMOTE_SHARED_READER, PGBUF_UNCONDITIONAL_LATCH, pgbuf_unfix, VFID_AS_ARGS, VFID_ISNULL, VPID_AS_ARGS, VPID_EQ, file_header::vpid_find_nth_last, VPID_ISNULL, file_find_nth_context::vpid_nth, and VPID_SET_NULL.
Referenced by ehash_fix_nth_page(), file_numerable_truncate(), sort_read_area(), and sort_write_area().
int file_numerable_truncate | ( | THREAD_ENTRY * | thread_p, |
const VFID * | vfid, | ||
DKNPAGES | npages | ||
) |
Definition at line 8340 of file file_manager.c.
References assert, ASSERT_ERROR, ASSERT_ERROR_AND_SET, assert_release, ER_FAILED, file_dealloc(), FILE_GET_HEADER_VPID, FILE_IS_NUMERABLE, file_numerable_find_nth(), file_header::n_page_mark_delete, file_header::n_page_user, NO_ERROR, NULL, OLD_PAGE, pgbuf_fix, PGBUF_LATCH_WRITE, PGBUF_UNCONDITIONAL_LATCH, pgbuf_unfix, and file_header::type.
Referenced by ehash_shrink_directory().
void file_postpone_destroy | ( | THREAD_ENTRY * | thread_p, |
const VFID * | vfid | ||
) |
Definition at line 4263 of file file_manager.c.
References assert, ASSERT_ERROR, FILE_IS_TEMPORARY, vfid::fileid, log_append_postpone(), LOG_DATA_ADDR_INITIALIZER, NULL, OLD_PAGE, vpid::pageid, pgbuf_fix, PGBUF_LATCH_READ, PGBUF_UNCONDITIONAL_LATCH, pgbuf_unfix_and_init, RVFL_DESTROY, vpid::volid, and vfid::volid.
Referenced by ehash_create_helper(), xbtree_delete_index(), xheap_destroy(), and xheap_destroy_newly_created().
int file_rv_dealloc_on_postpone | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 6629 of file file_manager.c.
References file_log, file_rv_dealloc_internal(), FILE_RV_DEALLOC_RUN_POSTPONE, LSA_AS_ARGS, and log_rcv::reference_lsa.
int file_rv_dealloc_on_undo | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 6614 of file file_manager.c.
References file_log, FILE_RV_DEALLOC_COMPENSATE, file_rv_dealloc_internal(), LSA_AS_ARGS, and log_rcv::reference_lsa.
int file_rv_destroy | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 4233 of file file_manager.c.
References assert, assert_release, log_rcv::data, file_destroy(), log_rcv::length, log_check_system_op_is_started(), and NO_ERROR.
void file_rv_dump_extdata_add | ( | FILE * | fp, |
int | length, | ||
void * | data | ||
) |
Definition at line 2289 of file file_manager.c.
References cubregex::count(), and log_rv_dump_hexa().
void file_rv_dump_extdata_remove | ( | FILE * | fp, |
int | length, | ||
void * | data | ||
) |
Definition at line 2312 of file file_manager.c.
References assert, cubregex::count(), and STATIC_INLINE.
void file_rv_dump_extdata_set_next | ( | FILE * | fp, |
int | length, | ||
void * | data | ||
) |
Definition at line 2197 of file file_manager.c.
References VPID_AS_ARGS.
void file_rv_dump_vfid_and_vpid | ( | FILE * | fp, |
int | length, | ||
void * | data | ||
) |
Definition at line 4989 of file file_manager.c.
References assert, NULL, VFID_AS_ARGS, and VPID_AS_ARGS.
int file_rv_extdata_add | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 2212 of file file_manager.c.
References assert, cubregex::count(), log_rcv::data, DB_PAGESIZE, DONT_FREE, FILE_EXTDATA_AS_ARGS, file_extdata_insert_at(), FILE_EXTDATA_MSG, file_log, log_rcv::length, NO_ERROR, NULL, log_rcv::offset, PGBUF_PAGE_STATE_ARGS, pgbuf_set_dirty(), log_rcv::pgptr, and file_extensible_data::size_of_item.
int file_rv_extdata_merge | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 2435 of file file_manager.c.
References assert, log_rcv::data, DB_PAGESIZE, DONT_FREE, FILE_EXTDATA_AS_ARGS, FILE_EXTDATA_MSG, file_extdata_size(), file_log, log_rcv::length, NO_ERROR, NULL, log_rcv::offset, PGBUF_PAGE_STATE_ARGS, PGBUF_PAGE_STATE_MSG, pgbuf_set_dirty(), log_rcv::pgptr, and STATIC_INLINE.
int file_rv_extdata_remove | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 2249 of file file_manager.c.
References assert, cubregex::count(), log_rcv::data, DB_PAGESIZE, DONT_FREE, FILE_EXTDATA_AS_ARGS, FILE_EXTDATA_MSG, file_extdata_remove_at(), file_log, log_rcv::length, NO_ERROR, NULL, log_rcv::offset, PGBUF_PAGE_STATE_ARGS, pgbuf_set_dirty(), and log_rcv::pgptr.
int file_rv_extdata_set_next | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 2167 of file file_manager.c.
References assert, log_rcv::data, DB_PAGESIZE, DONT_FREE, FILE_EXTDATA_AS_ARGS, FILE_EXTDATA_MSG, file_log, log_rcv::length, NO_ERROR, NULL, log_rcv::offset, PGBUF_PAGE_STATE_ARGS, pgbuf_set_dirty(), log_rcv::pgptr, VPID_COPY, and file_extensible_data::vpid_next.
int file_rv_fhead_alloc | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 1165 of file file_manager.c.
References assert, log_rcv::data, DONT_FREE, FILE_ALLOC_TABLE_PAGE, FILE_ALLOC_TYPE_STRING, FILE_ALLOC_USER_PAGE, FILE_HEAD_ALLOC_AS_ARGS, FILE_HEAD_ALLOC_MSG, file_header_alloc(), file_log, log_rcv::length, NO_ERROR, PGBUF_PAGE_STATE_ARGS, pgbuf_set_dirty(), log_rcv::pgptr, file_header::self, and VFID_AS_ARGS.
int file_rv_fhead_convert_ftab_to_user_page | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 4786 of file file_manager.c.
References DONT_FREE, file_header::n_page_ftab, file_header::n_page_user, NO_ERROR, pgbuf_set_dirty(), and log_rcv::pgptr.
int file_rv_fhead_convert_user_to_ftab_page | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 4806 of file file_manager.c.
References DONT_FREE, file_header::n_page_ftab, file_header::n_page_user, NO_ERROR, pgbuf_set_dirty(), and log_rcv::pgptr.
int file_rv_fhead_dealloc | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 1203 of file file_manager.c.
References assert, log_rcv::data, DONT_FREE, FILE_ALLOC_TABLE_PAGE, FILE_ALLOC_TYPE_STRING, FILE_ALLOC_USER_PAGE, FILE_HEAD_ALLOC_AS_ARGS, FILE_HEAD_ALLOC_MSG, file_header_dealloc(), file_log, log_rcv::length, NO_ERROR, PGBUF_PAGE_LSA_AS_ARGS, PGBUF_PAGE_VPID_AS_ARGS, pgbuf_set_dirty(), log_rcv::pgptr, file_header::self, STATIC_INLINE, and VFID_AS_ARGS.
int file_rv_fhead_set_last_user_page_ftab | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 1056 of file file_manager.c.
References assert, log_rcv::data, DONT_FREE, file_log, log_rcv::length, NO_ERROR, NULL, PGBUF_PAGE_STATE_ARGS, pgbuf_set_dirty(), log_rcv::pgptr, STATIC_INLINE, VFID_AS_ARGS, VPID_AS_ARGS, and VPID_COPY.
int file_rv_fhead_sticky_page | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 5604 of file file_manager.c.
References assert, log_rcv::data, DONT_FREE, file_log, log_rcv::length, NO_ERROR, PGBUF_PAGE_STATE_ARGS, pgbuf_set_dirty(), log_rcv::pgptr, file_header::self, VFID_AS_ARGS, VPID_AS_ARGS, and file_header::vpid_sticky_first.
int file_rv_header_update_mark_deleted | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 1344 of file file_manager.c.
References assert, log_rcv::data, DONT_FREE, file_log, log_rcv::length, NO_ERROR, NULL, PGBUF_PAGE_STATE_ARGS, pgbuf_set_dirty(), log_rcv::pgptr, STATIC_INLINE, and VFID_AS_ARGS.
int file_rv_partsect_clear | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 2933 of file file_manager.c.
References file_rv_partsect_update().
int file_rv_partsect_set | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 2920 of file file_manager.c.
References file_rv_partsect_update().
int file_rv_perm_expand_redo | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 4436 of file file_manager.c.
References assert, log_rcv::data, DISK_SECTOR_NPAGES, DONT_FREE, FILE_EMPTY_PAGE_BITMAP, file_extdata_append(), FILE_EXTDATA_AS_ARGS, file_extdata_is_empty(), FILE_EXTDATA_MSG, FILE_HEAD_ALLOC_AS_ARGS, FILE_HEAD_ALLOC_MSG, FILE_HEADER_GET_PART_FTAB, FILE_IS_TEMPORARY, file_log, log_rcv::length, file_header::n_page_free, file_header::n_page_total, file_header::n_sector_empty, file_header::n_sector_partial, file_header::n_sector_total, NO_ERROR, file_partial_sector::page_bitmap, PGBUF_PAGE_STATE_ARGS, pgbuf_set_dirty(), log_rcv::pgptr, file_header::self, VFID_AS_ARGS, and file_partial_sector::vsid.
int file_rv_perm_expand_undo | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 4387 of file file_manager.c.
References assert, DISK_SECTOR_NPAGES, DONT_FREE, file_extdata_item_count(), FILE_HEAD_ALLOC_AS_ARGS, FILE_HEAD_ALLOC_MSG, FILE_HEADER_GET_PART_FTAB, FILE_IS_TEMPORARY, file_log, file_extensible_data::n_items, file_header::n_page_free, file_header::n_page_total, file_header::n_sector_empty, file_header::n_sector_partial, file_header::n_sector_total, NO_ERROR, PGBUF_PAGE_STATE_ARGS, pgbuf_set_dirty(), log_rcv::pgptr, file_header::self, VFID_AS_ARGS, VPID_ISNULL, and file_extensible_data::vpid_next.
int file_rv_set_tde_algorithm | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 5724 of file file_manager.c.
References assert, log_rcv::data, DONT_FREE, file_set_tde_algorithm_internal(), log_rcv::length, NO_ERROR, pgbuf_set_dirty(), and log_rcv::pgptr.
int file_rv_tracker_mark_heap_deleted | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv, | ||
bool | is_undo | ||
) |
Definition at line 10324 of file file_manager.c.
References assert, assert_release, log_rcv::data, file_tracker_apply_to_file(), file_tracker_item_mark_heap_deleted(), log_rcv::length, LSA_ISNULL(), NO_ERROR, PGBUF_LATCH_WRITE, and log_rcv::reference_lsa.
Referenced by heap_rv_mark_deleted_on_postpone(), and heap_rv_mark_deleted_on_undo().
int file_rv_tracker_mark_heap_deleted_compensate_or_run_postpone | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 10355 of file file_manager.c.
References assert, ASSERT_ERROR, ASSERT_ERROR_AND_SET, DONT_FREE, file_compare_track_items(), file_dealloc(), file_destroy(), file_extdata_at(), file_extdata_item_count(), file_extdata_merge_pages(), FILE_HEAP, file_log, FILE_TRACK_ITEM_AS_ARGS, FILE_TRACK_ITEM_MSG, FILE_TRACKER, file_track_item::fileid, vfid::fileid, file_track_metadata::heap, file_track_heap_metadata::is_marked_deleted, log_rcv::length, log_check_system_op_is_started(), log_sysop_abort(), log_sysop_commit(), log_sysop_start(), file_track_item::metadata, NO_ERROR, NULL, log_rcv::offset, OLD_PAGE, pgbuf_fix, pgbuf_get_vpid(), PGBUF_LATCH_WRITE, PGBUF_PAGE_STATE_ARGS, PGBUF_PAGE_STATE_MSG, pgbuf_set_dirty(), PGBUF_UNCONDITIONAL_LATCH, pgbuf_unfix, pgbuf_unfix_and_init, log_rcv::pgptr, STATIC_INLINE, file_track_item::type, VFID_ISNULL, file_track_item::volid, vfid::volid, VPID_ISNULL, and file_extensible_data::vpid_next.
int file_rv_tracker_reuse_heap | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 10089 of file file_manager.c.
References assert, DONT_FREE, file_extdata_at(), file_extdata_item_count(), FILE_HEAP, file_log, FILE_TRACK_ITEM_AS_ARGS, FILE_TRACK_ITEM_MSG, file_track_metadata::heap, file_track_heap_metadata::is_marked_deleted, log_rcv::length, file_track_item::metadata, NO_ERROR, NULL, log_rcv::offset, PGBUF_PAGE_STATE_ARGS, PGBUF_PAGE_STATE_MSG, pgbuf_set_dirty(), log_rcv::pgptr, and file_track_item::type.
int file_rv_tracker_unregister_undo | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 9891 of file file_manager.c.
References assert, log_rcv::data, ER_FAILED, file_tracker_register_internal(), log_rcv::length, log_sysop_abort(), log_sysop_end_logical_compensate(), log_sysop_start(), NO_ERROR, NULL, OLD_PAGE, pgbuf_fix, PGBUF_LATCH_WRITE, PGBUF_UNCONDITIONAL_LATCH, pgbuf_unfix_and_init, and log_rcv::reference_lsa.
int file_rv_user_page_mark_delete | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 8144 of file file_manager.c.
References assert, DONT_FREE, file_log, FILE_USER_PAGE_IS_MARKED_DELETED, FILE_USER_PAGE_MARK_DELETED, NO_ERROR, NULL, log_rcv::offset, PGBUF_PAGE_STATE_ARGS, pgbuf_set_dirty(), log_rcv::pgptr, and VPID_AS_ARGS.
int file_rv_user_page_unmark_delete_logical | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 8169 of file file_manager.c.
References assert, assert_release, log_rcv::data, DONT_FREE, ER_FAILED, file_compare_vpids(), file_extdata_at(), file_extdata_search_item(), FILE_HEADER_GET_USER_PAGE_FTAB, FILE_IS_NUMERABLE, FILE_IS_TEMPORARY, file_log, FILE_USER_PAGE_CLEAR_MARK_DELETED, FILE_USER_PAGE_IS_MARKED_DELETED, vfid::fileid, log_rcv::length, log_append_compensate(), LOG_DATA_ADDR_INITIALIZER, LOG_FIND_CURRENT_TDES(), NO_ERROR, NULL, log_data_addr::offset, OLD_PAGE, vpid::pageid, pgbuf_fix, pgbuf_get_lsa(), pgbuf_get_vpid_ptr(), PGBUF_LATCH_WRITE, PGBUF_PAGE_MODIFY_ARGS, pgbuf_set_dirty(), PGBUF_UNCONDITIONAL_LATCH, pgbuf_unfix, log_data_addr::pgptr, RVFL_USER_PAGE_MARK_DELETE_COMPENSATE, VFID_AS_ARGS, vpid::volid, vfid::volid, VPID_AS_ARGS, and VPID_EQ.
int file_rv_user_page_unmark_delete_physical | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 8282 of file file_manager.c.
References assert, DONT_FREE, file_log, FILE_USER_PAGE_CLEAR_MARK_DELETED, FILE_USER_PAGE_IS_MARKED_DELETED, NO_ERROR, NULL, log_rcv::offset, PGBUF_PAGE_STATE_ARGS, pgbuf_set_dirty(), log_rcv::pgptr, and VPID_AS_ARGS.
int file_spacedb | ( | THREAD_ENTRY * | thread_p, |
SPACEDB_FILES * | spacedb | ||
) |
Definition at line 7653 of file file_manager.c.
References ASSERT_ERROR, file_tracker_spacedb(), i, spacedb_files::nfile, NO_ERROR, spacedb_files::npage_ftab, spacedb_files::npage_reserved, spacedb_files::npage_user, SPACEDB_FILE_COUNT, file_tempcache::spacedb_temp, SPACEDB_TEMP_FILE, and SPACEDB_TOTAL_FILE.
Referenced by netcl_spacedb(), and netsr_spacedb().
void file_temp_preserve | ( | THREAD_ENTRY * | thread_p, |
const VFID * | vfid | ||
) |
Definition at line 8881 of file file_manager.c.
References assert, assert_release, file_tempcache_pop_tran_file(), file_tempcache_retire_entry(), NULL, and VFID_ISNULL.
Referenced by qmgr_create_result_file(), and session_preserve_temporary_files().
int file_temp_retire | ( | THREAD_ENTRY * | thread_p, |
const VFID * | vfid | ||
) |
Definition at line 4299 of file file_manager.c.
References file_temp_retire_internal().
Referenced by qfile_destroy_list(), qmgr_create_result_file(), qmgr_free_list_temp_file(), qmgr_free_temp_file_list(), qmgr_get_new_page(), sort_add_new_file(), sort_checkalloc_numpages_of_outfiles(), sort_inphase_sort(), and sort_return_used_resources().
int file_temp_retire_preserved | ( | THREAD_ENTRY * | thread_p, |
const VFID * | vfid | ||
) |
Definition at line 4312 of file file_manager.c.
References file_temp_retire_internal(), and STATIC_INLINE.
Referenced by qfile_delete_list_cache_entry(), qmgr_free_list_temp_file(), and qmgr_free_temp_file_list().
void file_tempcache_drop_tran_temp_files | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 9381 of file file_manager.c.
References file_get_tempcache_entry_index(), file_get_tran_num_temp_files(), file_log, file_tempcache_cache_or_drop_entries(), NULL, STATIC_INLINE, and file_tempcache::tran_files.
Referenced by log_abort_local(), and log_commit_local().
DISK_ISVALID file_tracker_check | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 11134 of file file_manager.c.
References assert, ASSERT_ERROR, ASSERT_ERROR_AND_SET, assert_release, DISK_ERROR, DISK_INVALID, DISK_VALID, ER_FAILED, file_extdata_at(), file_table_check(), file_tracker_interruptable_iterate(), file_tracker_map(), FILE_UNKNOWN_TYPE, file_track_item::fileid, vfid::fileid, lock_unlock_object(), NO_ERROR, NULL, OID_INITIALIZER, OID_ISNULL, oid_Root_class_oid, PGBUF_LATCH_READ, SCH_S_LOCK, VFID_INITIALIZER, VFID_ISNULL, file_track_item::volid, and vfid::volid.
Referenced by xboot_check_db_consistency().
int file_tracker_create | ( | THREAD_ENTRY * | thread_p, |
VFID * | vfid_tracker_out | ||
) |
Definition at line 9564 of file file_manager.c.
References assert, ASSERT_ERROR, file_alloc_sticky_first_page(), file_create_with_npages(), FILE_TRACKER, file_tracker_init_page(), log_sysop_abort(), log_sysop_commit(), log_sysop_start(), NO_ERROR, NULL, VFID_COPY, VFID_SET_NULL, and VPID_SET_NULL.
Referenced by boot_create_all_volumes().
int file_tracker_dump | ( | THREAD_ENTRY * | thread_p, |
FILE * | fp | ||
) |
Definition at line 10868 of file file_manager.c.
References file_tracker_item_dump(), file_tracker_map(), and PGBUF_LATCH_READ.
Referenced by diagdb().
int file_tracker_dump_all_btree_capacities | ( | THREAD_ENTRY * | thread_p, |
FILE * | fp | ||
) |
Definition at line 11121 of file file_manager.c.
References file_tracker_item_dump_btree_capacity(), file_tracker_map(), and PGBUF_LATCH_READ.
Referenced by diagdb().
int file_tracker_dump_all_capacities | ( | THREAD_ENTRY * | thread_p, |
FILE * | fp | ||
) |
Definition at line 10929 of file file_manager.c.
References ASSERT_ERROR, file_tracker_item_dump_capacity(), file_tracker_map(), NO_ERROR, and PGBUF_LATCH_READ.
Referenced by diagdb().
int file_tracker_dump_all_heap | ( | THREAD_ENTRY * | thread_p, |
FILE * | fp, | ||
bool | dump_records | ||
) |
Definition at line 10994 of file file_manager.c.
References file_tracker_dump_heap_context::dump_records, file_tracker_item_dump_heap(), file_tracker_map(), file_tracker_dump_heap_context::fp, and PGBUF_LATCH_READ.
Referenced by diagdb().
int file_tracker_dump_all_heap_capacities | ( | THREAD_ENTRY * | thread_p, |
FILE * | fp | ||
) |
Definition at line 11058 of file file_manager.c.
References DB_PAGESIZE, file_tracker_item_dump_heap_capacity(), file_tracker_map(), IO_PAGESIZE, and PGBUF_LATCH_READ.
Referenced by diagdb().
int file_tracker_interruptable_iterate | ( | THREAD_ENTRY * | thread_p, |
FILE_TYPE | desired_ftype, | ||
VFID * | vfid, | ||
OID * | class_oid | ||
) |
Definition at line 10695 of file file_manager.c.
References assert, ASSERT_ERROR, ASSERT_ERROR_AND_SET, assert_release, ER_FAILED, file_compare_track_items(), file_extdata_at(), file_extdata_item_count(), file_extdata_search_item(), FILE_GET_TRACKER_LOCK_MODE, file_tracker_get_and_protect(), file_track_item::fileid, vfid::fileid, lock_unlock_object(), NO_ERROR, NULL, OID_ISNULL, oid_Root_class_oid, OID_SET_NULL, OLD_PAGE, pgbuf_fix, PGBUF_LATCH_READ, PGBUF_UNCONDITIONAL_LATCH, pgbuf_unfix, pgbuf_unfix_and_init, VFID_EQ, VFID_ISNULL, VFID_SET_NULL, file_track_item::volid, vfid::volid, VPID_ISNULL, and file_extensible_data::vpid_next.
Referenced by btree_check_all(), btree_repair_prev_link(), file_tracker_check(), and heap_check_all_heaps().
int file_tracker_load | ( | THREAD_ENTRY * | thread_p, |
const VFID * | vfid | ||
) |
Definition at line 9613 of file file_manager.c.
References assert, ASSERT_ERROR, file_get_sticky_first_page(), NO_ERROR, NULL, and VFID_ISNULL.
Referenced by boot_restart_server(), and xboot_emergency_patch().
int file_tracker_reuse_heap | ( | THREAD_ENTRY * | thread_p, |
const OID * | class_oid, | ||
HFID * | hfid_out | ||
) |
Definition at line 10252 of file file_manager.c.
References assert, file_tracker_reuse_heap_context::class_oid, file_tracker_item_reuse_heap(), file_tracker_map(), file_tracker_reuse_heap_context::hfid_out, HFID_SET_NULL, NULL, and PGBUF_LATCH_WRITE.
Referenced by heap_create_internal().
Definition at line 3025 of file file_manager.c.
References FILE_BTREE, FILE_BTREE_OVERFLOW_KEY, FILE_CATALOG, FILE_DROPPED_FILES, FILE_EXTENDIBLE_HASH, FILE_EXTENDIBLE_HASH_DIRECTORY, FILE_HEAP, FILE_HEAP_REUSE_SLOTS, FILE_MULTIPAGE_OBJECT_HEAP, FILE_QUERY_AREA, FILE_TEMP, FILE_TRACKER, FILE_UNKNOWN_TYPE, and FILE_VACUUM_DATA.
Referenced by file_create(), file_dealloc(), file_tempcache_dump(), file_tracker_item_dump_capacity(), heap_cache_class_info(), heap_hfid_cache_get(), and vacuum_heap_get_hfid_and_file_type().