Skip to content

File file_manager.c

FileList > cubrid > src > storage > file_manager.c

Go to the source code of this file

  • #include "config.h"
  • #include <stdio.h>
  • #include <stdlib.h>
  • #include <stddef.h>
  • #include <string.h>
  • #include <time.h>
  • #include <unordered_map>
  • #include <functional>
  • #include "file_manager.h"
  • #include "btree.h"
  • #include "porting.h"
  • #include "porting_inline.hpp"
  • #include "memory_alloc.h"
  • #include "storage_common.h"
  • #include "error_manager.h"
  • #include "file_io.h"
  • #include "page_buffer.h"
  • #include "disk_manager.h"
  • #include "log_append.hpp"
  • #include "log_manager.h"
  • #include "log_impl.h"
  • #include "log_lsa.hpp"
  • #include "lock_manager.h"
  • #include "system_parameter.h"
  • #include "boot_sr.h"
  • #include "memory_hash.h"
  • #include "environment_variable.h"
  • #include "xserver_interface.h"
  • #include "oid.h"
  • #include "heap_file.h"
  • #include "bit.h"
  • #include "util_func.h"
  • #include "vacuum.h"
  • #include "btree_load.h"
  • #include "critical_section.h"
  • #include "connection_error.h"
  • #include "fault_injection.h"
  • #include "thread_manager.hpp"
  • #include "partition_sr.h"
  • #include "memory_wrapper.hpp"

Namespaces

Type Name
namespace std
STL namespace.

Classes

Type Name
struct file_extensible_data
struct file_extensible_data_search_context
struct file_find_nth_context
struct file_header
struct file_map_context
struct file_set_tde_algorithm_args
struct file_tempcache
struct file_tempcache_entry
struct file_tempcache_tran_entry
struct file_track_heap_metadata
struct file_track_item
struct file_track_mark_heap_deleted_context
struct file_tracker_dump_heap_context
struct file_tracker_reuse_heap_context
struct file_vsid_collector
struct hash< VFID > <>

Public Types

Type Name
enum FILE_ALLOC_TYPE
typedef int(* FILE_EXTDATA_FUNC
typedef int(* FILE_EXTDATA_ITEM_FUNC
typedef struct file_extensible_data FILE_EXTENSIBLE_DATA
typedef struct file_extensible_data_search_context FILE_EXTENSIBLE_DATA_SEARCH_CONTEXT
typedef struct file_find_nth_context FILE_FIND_NTH_CONTEXT
typedef struct file_header FILE_HEADER
typedef struct file_map_context FILE_MAP_CONTEXT
typedef struct file_set_tde_algorithm_args FILE_SET_TDE_ALGORITHM_ARGS
typedef struct file_tempcache FILE_TEMPCACHE
typedef struct file_tempcache_entry FILE_TEMPCACHE_ENTRY
typedef struct file_tempcache_tran_entry FILE_TEMPCACHE_TRAN_ENTRY
typedef struct file_tracker_dump_heap_context FILE_TRACKER_DUMP_HEAP_CONTEXT
typedef struct file_tracker_reuse_heap_context FILE_TRACKER_REUSE_HEAP_CONTEXT
typedef struct file_track_heap_metadata FILE_TRACK_HEAP_METADATA
typedef struct file_track_item FILE_TRACK_ITEM
typedef int(* FILE_TRACK_ITEM_FUNC
typedef struct file_track_mark_heap_deleted_context FILE_TRACK_MARK_HEAP_DELETED_CONTEXT
typedef union file_track_metadata FILE_TRACK_METADATA
typedef struct file_vsid_collector FILE_VSID_COLLECTOR
union file_track_metadata

Public Static Attributes

Type Name
bool file_Logging = [**false**](broker__monitor_8c.md#function-timeout)
FILE_TEMPCACHE file_Tempcache
VFID file_Tracker_vfid = [**VFID\_INITIALIZER**](dbtype__def_8h.md#define-vfid_initializer)
VPID file_Tracker_vpid = [**VPID\_INITIALIZER**](dbtype__def_8h.md#define-vpid_initializer)

Public Functions

Type Name
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)
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)
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)
int file_apply_tde_algorithm (THREAD_ENTRY * thread_p, const VFID * vfid, const TDE_ALGORITHM tde_algo)
DISK_ISVALID file_check_vpid (THREAD_ENTRY * thread_p, const VFID * vfid, const VPID * vpid_lookup)
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)
int file_create_ehash (THREAD_ENTRY * thread_p, int npages, bool is_tmp, FILE_EHASH_DES * des_ehash, VFID * vfid)
int file_create_ehash_dir (THREAD_ENTRY * thread_p, int npages, bool is_tmp, FILE_EHASH_DES * des_ehash, VFID * vfid)
int file_create_heap (THREAD_ENTRY * thread_p, bool reuse_oid, const OID * class_oid, VFID * vfid)
int file_create_query_area (THREAD_ENTRY * thread_p, VFID * vfid)
int file_create_temp (THREAD_ENTRY * thread_p, int npages, VFID * vfid)
int file_create_temp_numerable (THREAD_ENTRY * thread_p, int npages, VFID * vfid)
int file_create_with_npages (THREAD_ENTRY * thread_p, FILE_TYPE file_type, int npages, FILE_DESCRIPTORS * des, VFID * vfid)
int file_dealloc (THREAD_ENTRY * thread_p, const VFID * vfid, const VPID * vpid, FILE_TYPE file_type_hint)
int file_delete_invalid_file (THREAD_ENTRY * thread_p, const std::unordered_map< VFID, FILE_TYPE > & invalid_files, int * heap, int * heap_ovf, int * btree, int * btree_ovf)
int file_descriptor_dump (THREAD_ENTRY * thread_p, const VFID * vfid, FILE * fp)
int file_descriptor_get (THREAD_ENTRY * thread_p, const VFID * vfid, FILE_DESCRIPTORS * desc_out)
int file_descriptor_update (THREAD_ENTRY * thread_p, const VFID * vfid, void * des_new)
int file_destroy (THREAD_ENTRY * thread_p, const VFID * vfid, bool is_temp)
int file_dump (THREAD_ENTRY * thread_p, const VFID * vfid, FILE * fp)
int file_get_all_data_sectors (THREAD_ENTRY * thread_p, const VFID * vfid, FILE_FTAB_COLLECTOR * collector_out)
int file_get_num_data_sectors (THREAD_ENTRY * thread_p, const VFID * vfid, int * n_sectors_out)
int file_get_num_total_user_pages (THREAD_ENTRY * thread_p, OID * cls_oid, int * total_pages)
int file_get_num_user_pages (THREAD_ENTRY * thread_p, const VFID * vfid, int * n_user_pages_out)
int file_get_sticky_first_page (THREAD_ENTRY * thread_p, const VFID * vfid, VPID * vpid_out)
int file_get_tde_algorithm (THREAD_ENTRY * thread_p, const VFID * vfid, PGBUF_LATCH_CONDITION fix_head_cond, TDE_ALGORITHM * tde_algo)
int file_get_tran_num_temp_files (THREAD_ENTRY * thread_p)
int file_get_type (THREAD_ENTRY * thread_p, const VFID * vfid, FILE_TYPE * ftype_out)
int file_init_page_type (THREAD_ENTRY * thread_p, PAGE_PTR page, void * args)
int file_init_temp_page_type (THREAD_ENTRY * thread_p, PAGE_PTR page, void * args)
int file_is_temp (THREAD_ENTRY * thread_p, const VFID * vfid, bool * is_temp)
bool file_is_valid_heap_file (THREAD_ENTRY * thread_p, OID * class_oid_p)
void file_manager_final (void)
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)
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)
int file_numerable_truncate (THREAD_ENTRY * thread_p, const VFID * vfid, DKNPAGES npages)
void file_postpone_destroy (THREAD_ENTRY * thread_p, const VFID * vfid)
int file_rv_dealloc_on_postpone (THREAD_ENTRY * thread_p, LOG_RCV * rcv)
int file_rv_dealloc_on_undo (THREAD_ENTRY * thread_p, LOG_RCV * rcv)
int file_rv_destroy (THREAD_ENTRY * thread_p, LOG_RCV * rcv)
void file_rv_dump_extdata_add (FILE * fp, int length, void * data)
void file_rv_dump_extdata_remove (FILE * fp, int length, void * data)
void file_rv_dump_extdata_set_next (FILE * fp, int ignore_length, void * data)
void file_rv_dump_vfid_and_vpid (FILE * fp, int length, void * data)
int file_rv_extdata_add (THREAD_ENTRY * thread_p, LOG_RCV * rcv)
int file_rv_extdata_merge (THREAD_ENTRY * thread_p, LOG_RCV * rcv)
int file_rv_extdata_remove (THREAD_ENTRY * thread_p, LOG_RCV * rcv)
int file_rv_extdata_set_next (THREAD_ENTRY * thread_p, LOG_RCV * rcv)
int file_rv_fhead_alloc (THREAD_ENTRY * thread_p, LOG_RCV * rcv)
int file_rv_fhead_convert_ftab_to_user_page (THREAD_ENTRY * thread_p, LOG_RCV * rcv)
int file_rv_fhead_convert_user_to_ftab_page (THREAD_ENTRY * thread_p, LOG_RCV * rcv)
int file_rv_fhead_dealloc (THREAD_ENTRY * thread_p, LOG_RCV * rcv)
int file_rv_fhead_set_last_user_page_ftab (THREAD_ENTRY * thread_p, LOG_RCV * rcv)
int file_rv_fhead_sticky_page (THREAD_ENTRY * thread_p, LOG_RCV * rcv)
int file_rv_header_update_mark_deleted (THREAD_ENTRY * thread_p, LOG_RCV * rcv)
int file_rv_partsect_clear (THREAD_ENTRY * thread_p, LOG_RCV * rcv)
int file_rv_partsect_set (THREAD_ENTRY * thread_p, LOG_RCV * rcv)
int file_rv_perm_expand_redo (THREAD_ENTRY * thread_p, LOG_RCV * rcv)
int file_rv_perm_expand_undo (THREAD_ENTRY * thread_p, LOG_RCV * rcv)
int file_rv_set_tde_algorithm (THREAD_ENTRY * thread_p, LOG_RCV * rcv)
int file_rv_tracker_mark_heap_deleted (THREAD_ENTRY * thread_p, LOG_RCV * rcv, bool is_undo)
int file_rv_tracker_mark_heap_deleted_compensate_or_run_postpone (THREAD_ENTRY * thread_p, LOG_RCV * rcv)
int file_rv_tracker_reuse_heap (THREAD_ENTRY * thread_p, LOG_RCV * rcv)
int file_rv_tracker_unregister_undo (THREAD_ENTRY * thread_p, LOG_RCV * rcv)
int file_rv_user_page_mark_delete (THREAD_ENTRY * thread_p, LOG_RCV * rcv)
int file_rv_user_page_unmark_delete_logical (THREAD_ENTRY * thread_p, LOG_RCV * rcv)
int file_rv_user_page_unmark_delete_physical (THREAD_ENTRY * thread_p, LOG_RCV * rcv)
int file_spacedb (THREAD_ENTRY * thread_p, SPACEDB_FILES * spacedb)
void file_temp_preserve (THREAD_ENTRY * thread_p, const VFID * vfid)
int file_temp_retire (THREAD_ENTRY * thread_p, const VFID * vfid)
int file_temp_retire_preserved (THREAD_ENTRY * thread_p, const VFID * vfid)
int file_temp_truncate (THREAD_ENTRY * thread_p, const VFID * vfid)
void file_tempcache_drop_tran_temp_files (THREAD_ENTRY * thread_p)
DISK_ISVALID file_tracker_check (THREAD_ENTRY * thread_p)
int file_tracker_create (THREAD_ENTRY * thread_p, VFID * vfid_tracker_out)
int file_tracker_dump (THREAD_ENTRY * thread_p, FILE * fp)
int file_tracker_dump_all_btree_capacities (THREAD_ENTRY * thread_p, FILE * fp)
int file_tracker_dump_all_capacities (THREAD_ENTRY * thread_p, FILE * fp)
int file_tracker_dump_all_heap (THREAD_ENTRY * thread_p, FILE * fp, bool dump_records)
int file_tracker_dump_all_heap_capacities (THREAD_ENTRY * thread_p, FILE * fp)
int file_tracker_interruptable_iterate (THREAD_ENTRY * thread_p, FILE_TYPE desired_ftype, VFID * vfid, OID * class_oid)
int file_tracker_load (THREAD_ENTRY * thread_p, const VFID * vfid)
int file_tracker_reclaim_marked_deleted (THREAD_ENTRY * thread_p)
int file_tracker_reuse_heap (THREAD_ENTRY * thread_p, const OID * class_oid, HFID * hfid_out)
const char * file_type_to_string (FILE_TYPE fstruct_type)
bool operator== (const VFID & a, const VFID & b)
bool parse_target_vfid (const char * in_vfid_str, VFID * out_vfid)
int xfile_apply_tde_to_class_files (THREAD_ENTRY * thread_p, const OID * class_oid)
int xfile_tracker_clean_invalid_file (THREAD_ENTRY * thread_p, int * heap, int * heap_ovf, int * btree, int * btree_ovf)
int xfile_tracker_delete_target_file (THREAD_ENTRY * thread_p, const char * target_vfid_str)
int xfile_tracker_dump_file_list (THREAD_ENTRY * thread_p, FILE * outfp, bool invalid_only)

Public Static Functions

Type Name
int file_compare_track_items (const void * first, const void * second)
int file_compare_vfids (const void * first, const void * second)
int file_compare_vpids (const void * first, const void * second)
int file_create_temp_internal (THREAD_ENTRY * thread_p, int npages, FILE_TYPE ftype, bool is_numerable, VFID * vfid_out)
int file_extdata_add_item_count (THREAD_ENTRY * thread_p, const FILE_EXTENSIBLE_DATA * extdata, bool * stop, void * args)
int file_extdata_all_item_count (THREAD_ENTRY * thread_p, FILE_EXTENSIBLE_DATA * extdata, int * count)
void file_extdata_append (FILE_EXTENSIBLE_DATA * extdata, const void * append_data)
void file_extdata_append_array (FILE_EXTENSIBLE_DATA * extdata, const void * append_data, INT16 count)
int file_extdata_apply_funcs (THREAD_ENTRY * thread_p, FILE_EXTENSIBLE_DATA * extdata_in, FILE_EXTDATA_FUNC f_extdata, void * f_extdata_args, FILE_EXTDATA_ITEM_FUNC f_item, void * f_item_args, bool for_write, FILE_EXTENSIBLE_DATA ** extdata_out, PAGE_PTR * page_out)
void * file_extdata_at (const FILE_EXTENSIBLE_DATA * extdata, int index)
bool file_extdata_can_merge (const FILE_EXTENSIBLE_DATA * extdata_src, const FILE_EXTENSIBLE_DATA * extdata_dest)
int file_extdata_collect_data_sectors_full (THREAD_ENTRY * thread_p, const void * item, int index_unused, bool * stop, void * args)
int file_extdata_collect_data_sectors_part (THREAD_ENTRY * thread_p, const void * item, int index_unused, bool * stop, void * args)
int file_extdata_collect_ftab_pages (THREAD_ENTRY * thread_p, const FILE_EXTENSIBLE_DATA * extdata, bool * stop, void * args)
void * file_extdata_end (const FILE_EXTENSIBLE_DATA * extdata)
int file_extdata_find_and_remove_item (THREAD_ENTRY * thread_p, FILE_EXTENSIBLE_DATA * extdata_first, PAGE_PTR page_first, const void * item, int(*)(const void *, const void *) compare_func, bool ordered, void * item_pop, VPID * vpid_merged)
int file_extdata_find_not_full (THREAD_ENTRY * thread_p, FILE_EXTENSIBLE_DATA ** extdata, PAGE_PTR * page_out, bool * found)
int file_extdata_find_nth_vpid (THREAD_ENTRY * thread_p, const FILE_EXTENSIBLE_DATA * extdata, bool * stop, void * args)
int file_extdata_find_nth_vpid_and_skip_marked (THREAD_ENTRY * thread_p, const void * data, int index, bool * stop, void * args)
void file_extdata_find_ordered (const FILE_EXTENSIBLE_DATA * extdata, const void * item_to_find, int(*)(const void *, const void *) compare_func, bool * found, int * position)
int file_extdata_func_for_search_ordered (THREAD_ENTRY * thread_p, const FILE_EXTENSIBLE_DATA * extdata, bool * stop, void * args)
void file_extdata_init (INT16 item_size, INT16 max_size, FILE_EXTENSIBLE_DATA * extdata)
void file_extdata_insert_at (FILE_EXTENSIBLE_DATA * extdata, int position, int count, const void * data)
bool file_extdata_is_empty (const FILE_EXTENSIBLE_DATA * extdata)
bool file_extdata_is_full (const FILE_EXTENSIBLE_DATA * extdata)
INT16 file_extdata_item_count (const FILE_EXTENSIBLE_DATA * extdata)
int file_extdata_item_func_for_search (THREAD_ENTRY * thread_p, const void * item, int index, bool * stop, void * args)
int file_extdata_max_size (const FILE_EXTENSIBLE_DATA * extdata)
void file_extdata_merge_ordered (const FILE_EXTENSIBLE_DATA * extdata_src, FILE_EXTENSIBLE_DATA * extdata_dest, int(*)(const void *, const void *) compare_func)
bool file_extdata_merge_pages (THREAD_ENTRY * thread_p, const FILE_EXTENSIBLE_DATA * extdata_src, const PAGE_PTR page_src, FILE_EXTENSIBLE_DATA * extdata_dest, PAGE_PTR page_dest, int(*)(const void *, const void *) compare_func, bool ordered)
void file_extdata_merge_unordered (const FILE_EXTENSIBLE_DATA * extdata_src, FILE_EXTENSIBLE_DATA * extdata_dest)
INT16 file_extdata_remaining_capacity (const FILE_EXTENSIBLE_DATA * extdata)
void file_extdata_remove_at (FILE_EXTENSIBLE_DATA * extdata, int position, int count)
int file_extdata_search_item (THREAD_ENTRY * thread_p, FILE_EXTENSIBLE_DATA ** extdata, const void * item_to_find, int(*)(const void *, const void *) compare_func, bool is_ordered, bool for_write, bool * found, int * position, PAGE_PTR * page_extdata)
int file_extdata_size (const FILE_EXTENSIBLE_DATA * extdata)
void * file_extdata_start (const FILE_EXTENSIBLE_DATA * extdata)
void file_extdata_update_item (THREAD_ENTRY * thread_p, PAGE_PTR page_extdata, const void * item_newval, int index_item, FILE_EXTENSIBLE_DATA * extdata)
int file_file_map_set_tde_algorithm (THREAD_ENTRY * thread_p, PAGE_PTR * page, bool * stop, void * args)
int file_full_table_extdata_dump (THREAD_ENTRY * thread_p, const FILE_EXTENSIBLE_DATA * extdata, bool * stop, void * args)
int file_full_table_item_dump (THREAD_ENTRY * thread_p, const void * data, int index, bool * stop, void * args)
TDE_ALGORITHM file_get_tde_algorithm_internal (const FILE_HEADER * fhead)
int file_get_tempcache_entry_index (THREAD_ENTRY * thread_p)
void file_header_alloc (FILE_HEADER * fhead, FILE_ALLOC_TYPE alloc_type, bool was_empty, bool is_full)
int file_header_copy (THREAD_ENTRY * thread_p, const VFID * vfid, FILE_HEADER * fhead_copy)
void file_header_dealloc (FILE_HEADER * fhead, FILE_ALLOC_TYPE alloc_type, bool is_empty, bool was_full)
void file_header_dump (THREAD_ENTRY * thread_p, const FILE_HEADER * fhead, FILE * fp)
void file_header_dump_descriptor (THREAD_ENTRY * thread_p, const FILE_HEADER * fhead, FILE * fp)
void file_header_init (FILE_HEADER * fhead)
void file_header_sanity_check (THREAD_ENTRY * thread_p, FILE_HEADER * fhead)
void file_header_update_mark_deleted (THREAD_ENTRY * thread_p, PAGE_PTR page_fhead, int delta)
int file_init_page_type_internal (THREAD_ENTRY * thread_p, PAGE_PTR page, PAGE_TYPE ptype, bool is_temp)
void file_log_extdata_add (THREAD_ENTRY * thread_p, const FILE_EXTENSIBLE_DATA * extdata, PAGE_PTR page, int position, int count, const void * data)
void file_log_extdata_remove (THREAD_ENTRY * thread_p, const FILE_EXTENSIBLE_DATA * extdata, PAGE_PTR page, int position, int count)
void file_log_extdata_set_next (THREAD_ENTRY * thread_p, const FILE_EXTENSIBLE_DATA * extdata, PAGE_PTR page, const VPID * vpid_next)
void file_log_fhead_alloc (THREAD_ENTRY * thread_p, PAGE_PTR page_fhead, FILE_ALLOC_TYPE alloc_type, bool was_empty, bool is_full)
void file_log_fhead_dealloc (THREAD_ENTRY * thread_p, PAGE_PTR page_fhead, FILE_ALLOC_TYPE alloc_type, bool is_empty, bool was_full)
int file_numerable_add_page (THREAD_ENTRY * thread_p, PAGE_PTR page_fhead, const VPID * vpid)
int file_partial_table_extdata_dump (THREAD_ENTRY * thread_p, const FILE_EXTENSIBLE_DATA * extdata, bool * stop, void * args)
int file_partial_table_item_dump (THREAD_ENTRY * thread_p, const void * data, int index, bool * stop, void * args)
bool file_partsect_alloc (FILE_PARTIAL_SECTOR * partsect, VPID * vpid_out, int * offset_out)
void file_partsect_clear_bit (FILE_PARTIAL_SECTOR * partsect, int offset)
bool file_partsect_is_bit_set (FILE_PARTIAL_SECTOR * partsect, int offset)
bool file_partsect_is_empty (FILE_PARTIAL_SECTOR * partsect)
bool file_partsect_is_full (FILE_PARTIAL_SECTOR * partsect)
int file_partsect_pageid_to_offset (FILE_PARTIAL_SECTOR * partsect, PAGEID pageid)
void file_partsect_set_bit (FILE_PARTIAL_SECTOR * partsect, int offset)
int file_perm_alloc (THREAD_ENTRY * thread_p, PAGE_PTR page_fhead, FILE_ALLOC_TYPE alloc_type, VPID * vpid_alloc_out)
int file_perm_dealloc (THREAD_ENTRY * thread_p, PAGE_PTR page_fhead, const VPID * vpid_dealloc, FILE_ALLOC_TYPE alloc_type)
int file_perm_expand (THREAD_ENTRY * thread_p, PAGE_PTR page_fhead)
void file_print_name_of_class (THREAD_ENTRY * thread_p, FILE * fp, const OID * class_oid_p)
int file_rv_dealloc_internal (THREAD_ENTRY * thread_p, LOG_RCV * rcv, bool compensate_or_run_postpone)
int file_rv_partsect_update (THREAD_ENTRY * thread_p, LOG_RCV * rcv, bool set)
int file_sector_map_dealloc (THREAD_ENTRY * thread_p, const void * data, int index, bool * stop, void * args)
int file_sector_map_dealloc_temp (THREAD_ENTRY * thread_p, const void * data, int index, bool * stop, void * args)
int file_sector_map_pages (THREAD_ENTRY * thread_p, const void * data, int index, bool * stop, void * args)
int file_set_tde_algorithm (THREAD_ENTRY * thread_p, const VFID * vfid, TDE_ALGORITHM tde_algo)
void file_set_tde_algorithm_internal (FILE_HEADER * fhead, TDE_ALGORITHM tde_algo)
int file_table_add_full_sector (THREAD_ENTRY * thread_p, PAGE_PTR page_fhead, const VSID * vsid)
int file_table_append_full_sector_page (THREAD_ENTRY * thread_p, PAGE_PTR page_fhead, const VPID * vpid_new)
DISK_ISVALID file_table_check (THREAD_ENTRY * thread_p, const VFID * vfid, DISK_VOLMAP_CLONE * disk_map_clone)
int file_table_check_page_is_in_sectors (THREAD_ENTRY * thread_p, const void * data, int index, bool * stop, void * args)
int file_table_collect_all_vsids (THREAD_ENTRY * thread_p, PAGE_PTR page_fhead, FILE_VSID_COLLECTOR * collector_out)
int file_table_collect_ftab_pages (THREAD_ENTRY * thread_p, PAGE_PTR page_fhead, bool collect_numerable, FILE_FTAB_COLLECTOR * collector_out)
int file_table_collect_vsid (THREAD_ENTRY * thread_p, const void * item, int index_unused, bool * stop, void * args)
bool file_table_collector_has_page (FILE_FTAB_COLLECTOR * collector, VPID * vpid)
int file_table_dump (THREAD_ENTRY * thread_p, const FILE_HEADER * fhead, FILE * fp)
int file_table_move_partial_sectors_to_header (THREAD_ENTRY * thread_p, PAGE_PTR page_fhead, FILE_ALLOC_TYPE alloc_type, VPID * vpid_alloc_out)
int file_temp_alloc (THREAD_ENTRY * thread_p, PAGE_PTR page_fhead, FILE_ALLOC_TYPE alloc_type, VPID * vpid_alloc_out)
int file_temp_reset_user_pages (THREAD_ENTRY * thread_p, const VFID * vfid)
int file_temp_retire_internal (THREAD_ENTRY * thread_p, const VFID * vfid, bool was_preserved)
int file_temp_set_type (THREAD_ENTRY * thread_p, VFID * vfid, FILE_TYPE ftype)
int file_tempcache_alloc_entry (FILE_TEMPCACHE_ENTRY ** entry)
void file_tempcache_cache_or_drop_entries (THREAD_ENTRY * thread_p, FILE_TEMPCACHE_ENTRY ** entries)
bool file_tempcache_check_duplicate (THREAD_ENTRY * thread_p, FILE_TEMPCACHE_ENTRY * entry, bool is_numerable)
void file_tempcache_check_lock (void)
void file_tempcache_dump (FILE * fp)
void file_tempcache_final (void)
void file_tempcache_free_entry_list (FILE_TEMPCACHE_ENTRY ** list)
int file_tempcache_get (THREAD_ENTRY * thread_p, FILE_TYPE ftype, bool numerable, FILE_TEMPCACHE_ENTRY ** entry)
int file_tempcache_init (void)
void file_tempcache_lock (void)
void file_tempcache_lock_tran_entry (FILE_TEMPCACHE_TRAN_ENTRY * tran_entry)
FILE_TEMPCACHE_ENTRY * file_tempcache_pop_tran_file (THREAD_ENTRY * thread_p, const VFID * vfid)
void file_tempcache_push_tran_file (THREAD_ENTRY * thread_p, FILE_TEMPCACHE_ENTRY * entry)
bool file_tempcache_put (THREAD_ENTRY * thread_p, FILE_TEMPCACHE_ENTRY * entry)
void file_tempcache_retire_entry (FILE_TEMPCACHE_ENTRY * entry)
void file_tempcache_unlock (void)
void file_tempcache_unlock_tran_entry (FILE_TEMPCACHE_TRAN_ENTRY * tran_entry)
int file_tracker_apply_to_file (THREAD_ENTRY * thread_p, const VFID * vfid, PGBUF_LATCH_MODE mode, FILE_TRACK_ITEM_FUNC func, void * args)
int file_tracker_get_and_protect (THREAD_ENTRY * thread_p, FILE_TYPE desired_type, FILE_TRACK_ITEM * item, OID * class_oid, bool * stop)
int file_tracker_init_page (THREAD_ENTRY * thread_p, PAGE_PTR page, void * args)
int file_tracker_item_check (THREAD_ENTRY * thread_p, PAGE_PTR page_of_item, FILE_EXTENSIBLE_DATA * extdata, int index_item, bool * stop, void * args)
int file_tracker_item_collect_invalid_file (THREAD_ENTRY * thread_p, PAGE_PTR page_of_item, FILE_EXTENSIBLE_DATA * extdata, int index_item, bool * stop, void * args)
int file_tracker_item_delete_target_file (THREAD_ENTRY * thread_p, PAGE_PTR page_of_item, FILE_EXTENSIBLE_DATA * extdata, int index_item, bool * stop, void * args)
int file_tracker_item_dump (THREAD_ENTRY * thread_p, PAGE_PTR page_of_item, FILE_EXTENSIBLE_DATA * extdata, int index_item, bool * stop, void * args)
int file_tracker_item_dump_btree_capacity (THREAD_ENTRY * thread_p, PAGE_PTR page_of_item, FILE_EXTENSIBLE_DATA * extdata, int index_item, bool * stop, void * args)
int file_tracker_item_dump_capacity (THREAD_ENTRY * thread_p, PAGE_PTR page_of_item, FILE_EXTENSIBLE_DATA * extdata, int index_item, bool * stop, void * args)
int file_tracker_item_dump_file (THREAD_ENTRY * thread_p, PAGE_PTR page_of_item, FILE_EXTENSIBLE_DATA * extdata, int index_item, bool * stop, void * args)
int file_tracker_item_dump_heap (THREAD_ENTRY * thread_p, PAGE_PTR page_of_item, FILE_EXTENSIBLE_DATA * extdata, int index_item, bool * stop, void * args)
int file_tracker_item_dump_heap_capacity (THREAD_ENTRY * thread_p, PAGE_PTR page_of_item, FILE_EXTENSIBLE_DATA * extdata, int index_item, bool * stop, void * args)
int file_tracker_item_mark_heap_deleted (THREAD_ENTRY * thread_p, PAGE_PTR page_of_item, FILE_EXTENSIBLE_DATA * extdata, int index_item, bool * stop, void * ignore_args)
int file_tracker_item_reuse_heap (THREAD_ENTRY * thread_p, PAGE_PTR page_of_item, FILE_EXTENSIBLE_DATA * extdata, int index_item, bool * stop, void * args)
int file_tracker_item_spacedb (THREAD_ENTRY * thread_p, PAGE_PTR page_of_item, FILE_EXTENSIBLE_DATA * extdata, int index_item, bool * stop, void * args)
int file_tracker_map (THREAD_ENTRY * thread_p, PGBUF_LATCH_MODE latch_mode, FILE_TRACK_ITEM_FUNC func, void * args)
int file_tracker_register (THREAD_ENTRY * thread_p, const VFID * vfid, FILE_TYPE ftype, FILE_TRACK_METADATA * metadata)
int file_tracker_register_internal (THREAD_ENTRY * thread_p, PAGE_PTR page_track_head, const FILE_TRACK_ITEM * item)
int file_tracker_spacedb (THREAD_ENTRY * thread_p, SPACEDB_FILES * spacedb)
int file_tracker_unregister (THREAD_ENTRY * thread_p, const VFID * vfid)
int file_user_page_table_extdata_dump (THREAD_ENTRY * thread_p, const FILE_EXTENSIBLE_DATA * extdata, bool * stop, void * args)
int file_user_page_table_item_dump (THREAD_ENTRY * thread_p, const void * data, int index, bool * stop, void * args)

Macros

Type Name
define FILE_ALLOC_TYPE_STRING (alloc_type) ((alloc\_type) == FILE\_ALLOC\_USER\_PAGE ? "alloc user [**page"**](broker__monitor_8c.md#function-timeout) : "alloc table [**page"**](broker__monitor_8c.md#function-timeout))
define FILE_CACHE_LAST_FIND_NTH (fh, thread_p) /* multi line expression */
define FILE_EXTDATA_AS_ARGS (extdata) [**VPID\_AS\_ARGS**](dbtype__def_8h.md#define-vpid_as_args) (&([**extdata**](broker__monitor_8c.md#function-timeout))-&gt;vpid\_next), ([**extdata**](broker__monitor_8c.md#function-timeout))-&gt;max\_size, ([**extdata**](broker__monitor_8c.md#function-timeout))-&gt;size\_of\_item, ([**extdata**](broker__monitor_8c.md#function-timeout))-&gt;n\_items
define FILE_EXTDATA_HEADER_ALIGNED_SIZE ([**DB\_ALIGN**](memory__alloc_8h.md#define-db_align) ([**sizeof**](broker__monitor_8c.md#function-timeout) ([**FILE\_EXTENSIBLE\_DATA**](file__manager_8c.md#typedef-file_extensible_data)), [**MAX\_ALIGNMENT**](memory__alloc_8h.md#define-max_alignment)))
define FILE_EXTDATA_MSG (name) "\t" name ": { vpid\_next = %d\|%d, max\_size = %d, item\_size = %d, n\_items = %d } \[**n"**](broker__monitor_8c.md#function-timeout)
define FILE_FLAG_ENCRYPTED_AES 0x4 /\* [**Is**](broker__monitor_8c.md#function-timeout) file [**encrypted**](broker__monitor_8c.md#function-timeout) [**using**](broker__monitor_8c.md#function-timeout) [**AES**](broker__monitor_8c.md#function-timeout) \*/
define FILE_FLAG_ENCRYPTED_ARIA 0x8 /\* [**Is**](broker__monitor_8c.md#function-timeout) file [**encrypted**](broker__monitor_8c.md#function-timeout) [**using**](broker__monitor_8c.md#function-timeout) [**ARIA**](broker__monitor_8c.md#function-timeout) \*/
define FILE_FLAG_ENCRYPTED_MASK 0x0000000c /\* 0x4 + 0x8 \*/
define FILE_FLAG_NUMERABLE 0x1 /\* [**Is**](broker__monitor_8c.md#function-timeout) file [**numerable**](broker__monitor_8c.md#function-timeout) \*/
define FILE_FLAG_TEMPORARY 0x2 /\* [**Is**](broker__monitor_8c.md#function-timeout) file [**temporary**](broker__monitor_8c.md#function-timeout) \*/
define FILE_GET_HEADER_VPID (vfid, vpid) ([**vpid**](structvpid.md))-&gt;volid = ([**vfid**](structvfid.md))-&gt;volid; ([**vpid**](structvpid.md))-&gt;pageid = ([**vfid**](structvfid.md))-&gt;fileid
define FILE_GET_TRACKER_LOCK_MODE (file_type) (((file\_type) == FILE\_BTREE) ? IX\_LOCK : SCH\_S\_LOCK)
define FILE_HEADER_ALIGNED_SIZE (([**INT16**](broker__monitor_8c.md#function-timeout)) ([**DB\_ALIGN**](memory__alloc_8h.md#define-db_align) ([**sizeof**](broker__monitor_8c.md#function-timeout) ([**FILE\_HEADER**](file__manager_8c.md#typedef-file_header)), [**MAX\_ALIGNMENT**](memory__alloc_8h.md#define-max_alignment))))
define FILE_HEADER_GET_FULL_FTAB (fh, fulltab) /* multi line expression */
define FILE_HEADER_GET_PART_FTAB (fh, parttab) /* multi line expression */
define FILE_HEADER_GET_USER_PAGE_FTAB (fh, pagetab) /* multi line expression */
define FILE_HEAD_ALLOC_AS_ARGS (fhead) /* multi line expression */
define FILE_HEAD_ALLOC_MSG /* multi line expression */
define FILE_HEAD_FULL_AS_ARGS (fhead) /* multi line expression */
define FILE_HEAD_FULL_MSG /* multi line expression */
define FILE_IS_NUMERABLE (fh) ((([**fh**](broker__monitor_8c.md#function-timeout))-&gt;file\_flags & [**FILE\_FLAG\_NUMERABLE**](file__manager_8c.md#define-file_flag_numerable)) != 0)
define FILE_IS_TDE_ENCRYPTED (fh) ((([**fh**](broker__monitor_8c.md#function-timeout))-&gt;file\_flags & [**FILE\_FLAG\_ENCRYPTED\_MASK**](file__manager_8c.md#define-file_flag_encrypted_mask)) != 0)
define FILE_IS_TEMPORARY (fh) ((([**fh**](broker__monitor_8c.md#function-timeout))-&gt;file\_flags & [**FILE\_FLAG\_TEMPORARY**](file__manager_8c.md#define-file_flag_temporary)) != 0)
define FILE_NUMERABLE_REGULAR_STRING (is_numerable) (([**is\_numerable**](broker__monitor_8c.md#function-timeout)) ? "numerable" : "regular")
define FILE_PARTSECT_AS_ARGS (ps) [**VSID\_AS\_ARGS**](dbtype__def_8h.md#define-vsid_as_args) (&([**ps**](broker__monitor_8c.md#function-timeout))-&gt;[**vsid**](structvsid.md)), ([**long**](broker__monitor_8c.md#function-timeout) [**long**](broker__monitor_8c.md#function-timeout) [**unsigned**](broker__monitor_8c.md#function-timeout) [**int**](broker__monitor_8c.md#function-timeout)) ([**ps**](broker__monitor_8c.md#function-timeout))-&gt;[**page\_bitmap**](structpage__bitmap.md)
define FILE_PARTSECT_MSG (name) "\t" name ": { vsid = %d\|%d, page bitmap = " BIT64\_HEXA\_PRINT\_FORMAT " } \n"
define FILE_PERM_TEMP_STRING (is_temp) ((is\_temp) ? "temporary" : "permanent")
define FILE_RV_DEALLOC_COMPENSATE [**true**](broker__monitor_8c.md#function-timeout)
define FILE_RV_DEALLOC_RUN_POSTPONE [**false**](broker__monitor_8c.md#function-timeout)
define FILE_TABLESPACE_AS_ARGS (tabspace) /* multi line expression */
define FILE_TABLESPACE_DEFAULT_MAX_EXPAND ([**DISK\_SECTOR\_NPAGES**](storage__common_8h.md#define-disk_sector_npages) \* [**DB\_PAGESIZE**](storage__common_8h.md#define-db_pagesize) \* 1024); /\* 1[**k**](broker__monitor_8c.md#function-timeout) sectors \*/
define FILE_TABLESPACE_DEFAULT_MIN_EXPAND ([**DISK\_SECTOR\_NPAGES**](storage__common_8h.md#define-disk_sector_npages) \* [**DB\_PAGESIZE**](storage__common_8h.md#define-db_pagesize)); /\* [**one**](broker__monitor_8c.md#function-timeout) [**sector**](broker__monitor_8c.md#function-timeout) \*/
define FILE_TABLESPACE_DEFAULT_RATIO_EXPAND (([**float**](broker__monitor_8c.md#function-timeout)) 0.01) /\* 1% [**of**](broker__monitor_8c.md#function-timeout) current size \*/
define FILE_TABLESPACE_FOR_PERM_NPAGES (tabspace, npages) /* multi line expression */
define FILE_TABLESPACE_FOR_TEMP_NPAGES (tabspace, npages) /* multi line expression */
define FILE_TABLESPACE_MSG "\ttablespace = { [**init\_size**](broker__monitor_8c.md#function-timeout) = %[**lld**](broker__monitor_8c.md#function-timeout), expand\_ratio = %f, expand\_min\_size = %d, expand\_max\_size = %d } \[**n"**](broker__monitor_8c.md#function-timeout)
define FILE_TEMPCACHE_AS_ARGS /* multi line expression */
define FILE_TEMPCACHE_ENTRY_AS_ARGS (ent) ent, [**VFID\_AS\_ARGS**](dbtype__def_8h.md#define-vfid_as_args) (&(ent)-&gt;[**vfid**](structvfid.md)), [**file\_type\_to\_string**](file__manager_8c.md#function-file_type_to_string) ((ent)-&gt;ftype)
define FILE_TEMPCACHE_ENTRY_MSG "%p, [**VFID**](dbtype__def_8h.md#typedef-vfid) %d\|%d, %[**s"**](broker__monitor_8c.md#function-timeout)
define FILE_TEMPCACHE_MSG /* multi line expression */
define FILE_TRACK_ITEM_AS_ARGS (item) (item)-&gt;volid, (item)-&gt;fileid, [**file\_type\_to\_string**](file__manager_8c.md#function-file_type_to_string) (([**FILE\_TYPE**](file__manager_8h.md#enum-file_type)) (item)-&gt;type)
define FILE_TRACK_ITEM_MSG "VFID %d\|%d, %[**s"**](broker__monitor_8c.md#function-timeout)
define FILE_TYPE_CAN_BE_NUMERABLE (ftype) /* multi line expression */
define FILE_TYPE_IS_ALWAYS_TEMP (ftype) /* multi line expression */
define FILE_TYPE_IS_NEVER_TEMP (ftype) (![**FILE\_TYPE\_IS\_ALWAYS\_TEMP**](file__manager_8c.md#define-file_type_is_always_temp) (ftype) && ![**FILE\_TYPE\_IS\_SOMETIMES\_TEMP**](file__manager_8c.md#define-file_type_is_sometimes_temp) (ftype))
define FILE_TYPE_IS_SOMETIMES_TEMP (ftype) /* multi line expression */
define FILE_USER_PAGE_CLEAR_MARK_DELETED (vpid) (([**VPID**](dbtype__def_8h.md#typedef-vpid) \*) [**vpid**](structvpid.md))-&gt;pageid &= ~[**FILE\_USER\_PAGE\_MARK\_DELETE\_FLAG**](file__manager_8c.md#define-file_user_page_mark_delete_flag)
define FILE_USER_PAGE_IS_MARKED_DELETED (vpid) (((([**VPID**](dbtype__def_8h.md#typedef-vpid) \*) [**vpid**](structvpid.md))-&gt;pageid & [**FILE\_USER\_PAGE\_MARK\_DELETE\_FLAG**](file__manager_8c.md#define-file_user_page_mark_delete_flag)) != 0)
define FILE_USER_PAGE_MARK_DELETED (vpid) (([**VPID**](dbtype__def_8h.md#typedef-vpid) \*) [**vpid**](structvpid.md))-&gt;pageid \|= [**FILE\_USER\_PAGE\_MARK\_DELETE\_FLAG**](file__manager_8c.md#define-file_user_page_mark_delete_flag)
define FILE_USER_PAGE_MARK_DELETE_FLAG (([**PAGEID**](storage__common_8h.md#typedef-pageid)) 0x80000000)
define LOG_BOOL_COUNT 3
define LOG_BOOL_COUNT 3
define LOG_DATA_SIZE ([**sizeof**](broker__monitor_8c.md#function-timeout) ([**VFID**](dbtype__def_8h.md#typedef-vfid)) + [**sizeof**](broker__monitor_8c.md#function-timeout) ([**VPID**](dbtype__def_8h.md#typedef-vpid)))
define UNDO_DATA_SIZE ([**sizeof**](broker__monitor_8c.md#function-timeout) ([**VFID**](dbtype__def_8h.md#typedef-vfid)) + [**sizeof**](broker__monitor_8c.md#function-timeout) ([**VPID**](dbtype__def_8h.md#typedef-vpid)))
define file_log (func, msg, ...) /* multi line expression */

Public Types Documentation

enum FILE_ALLOC_TYPE

enum FILE_ALLOC_TYPE {
    FILE_ALLOC_USER_PAGE,
    FILE_ALLOC_TABLE_PAGE,
    FILE_ALLOC_TABLE_PAGE_FULL_SECTOR
};

typedef FILE_EXTDATA_FUNC

typedef int(* FILE_EXTDATA_FUNC) (THREAD_ENTRY *thread_p, const FILE_EXTENSIBLE_DATA *extdata, bool *stop, void *args);

typedef FILE_EXTDATA_ITEM_FUNC

typedef int(* FILE_EXTDATA_ITEM_FUNC) (THREAD_ENTRY *thread_p, const void *data, int index, bool *stop, void *args);

typedef FILE_EXTENSIBLE_DATA

typedef struct file_extensible_data FILE_EXTENSIBLE_DATA;

typedef FILE_EXTENSIBLE_DATA_SEARCH_CONTEXT

typedef struct file_extensible_data_search_context FILE_EXTENSIBLE_DATA_SEARCH_CONTEXT;

typedef FILE_FIND_NTH_CONTEXT

typedef struct file_find_nth_context FILE_FIND_NTH_CONTEXT;

typedef FILE_HEADER

typedef struct file_header FILE_HEADER;

typedef FILE_MAP_CONTEXT

typedef struct file_map_context FILE_MAP_CONTEXT;

typedef FILE_SET_TDE_ALGORITHM_ARGS

typedef struct file_set_tde_algorithm_args FILE_SET_TDE_ALGORITHM_ARGS;

typedef FILE_TEMPCACHE

typedef struct file_tempcache FILE_TEMPCACHE;

typedef FILE_TEMPCACHE_ENTRY

typedef struct file_tempcache_entry FILE_TEMPCACHE_ENTRY;

typedef FILE_TEMPCACHE_TRAN_ENTRY

typedef struct file_tempcache_tran_entry FILE_TEMPCACHE_TRAN_ENTRY;

typedef FILE_TRACKER_DUMP_HEAP_CONTEXT

typedef struct file_tracker_dump_heap_context FILE_TRACKER_DUMP_HEAP_CONTEXT;

typedef FILE_TRACKER_REUSE_HEAP_CONTEXT

typedef struct file_tracker_reuse_heap_context FILE_TRACKER_REUSE_HEAP_CONTEXT;

typedef FILE_TRACK_HEAP_METADATA

typedef struct file_track_heap_metadata FILE_TRACK_HEAP_METADATA;

typedef FILE_TRACK_ITEM

typedef struct file_track_item FILE_TRACK_ITEM;

typedef FILE_TRACK_ITEM_FUNC

typedef int(* FILE_TRACK_ITEM_FUNC) (THREAD_ENTRY *thread_p, PAGE_PTR page_of_item, FILE_EXTENSIBLE_DATA *extdata, int index_item, bool *stop, void *args);

typedef FILE_TRACK_MARK_HEAP_DELETED_CONTEXT

typedef struct file_track_mark_heap_deleted_context FILE_TRACK_MARK_HEAP_DELETED_CONTEXT;

typedef FILE_TRACK_METADATA

typedef union file_track_metadata FILE_TRACK_METADATA;

typedef FILE_VSID_COLLECTOR

typedef struct file_vsid_collector FILE_VSID_COLLECTOR;

union file_track_metadata



Public Static Attributes Documentation

variable file_Logging

bool file_Logging;

variable file_Tempcache

FILE_TEMPCACHE file_Tempcache;

variable file_Tracker_vfid

VFID file_Tracker_vfid;

variable file_Tracker_vpid

VPID file_Tracker_vpid;

Public Functions Documentation

function file_alloc

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
) 

function file_alloc_multiple

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
) 

function file_alloc_sticky_first_page

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
) 

function file_apply_tde_algorithm

int file_apply_tde_algorithm (
    THREAD_ENTRY * thread_p,
    const  VFID * vfid,
    const  TDE_ALGORITHM tde_algo
) 

function file_check_vpid

DISK_ISVALID file_check_vpid (
    THREAD_ENTRY * thread_p,
    const  VFID * vfid,
    const  VPID * vpid_lookup
) 

function file_create

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
) 

function file_create_ehash

int file_create_ehash (
    THREAD_ENTRY * thread_p,
    int npages,
    bool is_tmp,
    FILE_EHASH_DES * des_ehash,
    VFID * vfid
) 

function file_create_ehash_dir

int file_create_ehash_dir (
    THREAD_ENTRY * thread_p,
    int npages,
    bool is_tmp,
    FILE_EHASH_DES * des_ehash,
    VFID * vfid
) 

function file_create_heap

int file_create_heap (
    THREAD_ENTRY * thread_p,
    bool reuse_oid,
    const  OID * class_oid,
    VFID * vfid
) 

function file_create_query_area

int file_create_query_area (
    THREAD_ENTRY * thread_p,
    VFID * vfid
) 

function file_create_temp

int file_create_temp (
    THREAD_ENTRY * thread_p,
    int npages,
    VFID * vfid
) 

function file_create_temp_numerable

int file_create_temp_numerable (
    THREAD_ENTRY * thread_p,
    int npages,
    VFID * vfid
) 

function file_create_with_npages

int file_create_with_npages (
    THREAD_ENTRY * thread_p,
    FILE_TYPE file_type,
    int npages,
    FILE_DESCRIPTORS * des,
    VFID * vfid
) 

function file_dealloc

int file_dealloc (
    THREAD_ENTRY * thread_p,
    const  VFID * vfid,
    const  VPID * vpid,
    FILE_TYPE file_type_hint
) 

function file_delete_invalid_file

int file_delete_invalid_file (
    THREAD_ENTRY * thread_p,
    const std::unordered_map< VFID , FILE_TYPE > & invalid_files,
    int * heap,
    int * heap_ovf,
    int * btree,
    int * btree_ovf
) 

function file_descriptor_dump

int file_descriptor_dump (
    THREAD_ENTRY * thread_p,
    const  VFID * vfid,
    FILE * fp
) 

function file_descriptor_get

int file_descriptor_get (
    THREAD_ENTRY * thread_p,
    const  VFID * vfid,
    FILE_DESCRIPTORS * desc_out
) 

function file_descriptor_update

int file_descriptor_update (
    THREAD_ENTRY * thread_p,
    const  VFID * vfid,
    void * des_new
) 

function file_destroy

int file_destroy (
    THREAD_ENTRY * thread_p,
    const  VFID * vfid,
    bool is_temp
) 

function file_dump

int file_dump (
    THREAD_ENTRY * thread_p,
    const  VFID * vfid,
    FILE * fp
) 

function file_get_all_data_sectors

int file_get_all_data_sectors (
    THREAD_ENTRY * thread_p,
    const  VFID * vfid,
    FILE_FTAB_COLLECTOR * collector_out
) 

function file_get_num_data_sectors

int file_get_num_data_sectors (
    THREAD_ENTRY * thread_p,
    const  VFID * vfid,
    int * n_sectors_out
) 

function file_get_num_total_user_pages

int file_get_num_total_user_pages (
    THREAD_ENTRY * thread_p,
    OID * cls_oid,
    int * total_pages
) 

function file_get_num_user_pages

int file_get_num_user_pages (
    THREAD_ENTRY * thread_p,
    const  VFID * vfid,
    int * n_user_pages_out
) 

function file_get_sticky_first_page

int file_get_sticky_first_page (
    THREAD_ENTRY * thread_p,
    const  VFID * vfid,
    VPID * vpid_out
) 

function file_get_tde_algorithm

int file_get_tde_algorithm (
    THREAD_ENTRY * thread_p,
    const  VFID * vfid,
    PGBUF_LATCH_CONDITION fix_head_cond,
    TDE_ALGORITHM * tde_algo
) 

function file_get_tran_num_temp_files

int file_get_tran_num_temp_files (
    THREAD_ENTRY * thread_p
) 

function file_get_type

int file_get_type (
    THREAD_ENTRY * thread_p,
    const  VFID * vfid,
    FILE_TYPE * ftype_out
) 

function file_init_page_type

int file_init_page_type (
    THREAD_ENTRY * thread_p,
    PAGE_PTR page,
    void * args
) 

function file_init_temp_page_type

int file_init_temp_page_type (
    THREAD_ENTRY * thread_p,
    PAGE_PTR page,
    void * args
) 

function file_is_temp

int file_is_temp (
    THREAD_ENTRY * thread_p,
    const  VFID * vfid,
    bool * is_temp
) 

function file_is_valid_heap_file

bool file_is_valid_heap_file (
    THREAD_ENTRY * thread_p,
    OID * class_oid_p
) 

function file_manager_final

void file_manager_final (
    void
) 

function file_manager_init

int file_manager_init (
    void
) 

function file_map_pages

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
) 

function file_numerable_find_nth

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
) 

function file_numerable_truncate

int file_numerable_truncate (
    THREAD_ENTRY * thread_p,
    const  VFID * vfid,
    DKNPAGES npages
) 

function file_postpone_destroy

void file_postpone_destroy (
    THREAD_ENTRY * thread_p,
    const  VFID * vfid
) 

function file_rv_dealloc_on_postpone

int file_rv_dealloc_on_postpone (
    THREAD_ENTRY * thread_p,
    LOG_RCV * rcv
) 

function file_rv_dealloc_on_undo

int file_rv_dealloc_on_undo (
    THREAD_ENTRY * thread_p,
    LOG_RCV * rcv
) 

function file_rv_destroy

int file_rv_destroy (
    THREAD_ENTRY * thread_p,
    LOG_RCV * rcv
) 

function file_rv_dump_extdata_add

void file_rv_dump_extdata_add (
    FILE * fp,
    int length,
    void * data
) 

function file_rv_dump_extdata_remove

void file_rv_dump_extdata_remove (
    FILE * fp,
    int length,
    void * data
) 

function file_rv_dump_extdata_set_next

void file_rv_dump_extdata_set_next (
    FILE * fp,
    int ignore_length,
    void * data
) 

function file_rv_dump_vfid_and_vpid

void file_rv_dump_vfid_and_vpid (
    FILE * fp,
    int length,
    void * data
) 

function file_rv_extdata_add

int file_rv_extdata_add (
    THREAD_ENTRY * thread_p,
    LOG_RCV * rcv
) 

function file_rv_extdata_merge

int file_rv_extdata_merge (
    THREAD_ENTRY * thread_p,
    LOG_RCV * rcv
) 

function file_rv_extdata_remove

int file_rv_extdata_remove (
    THREAD_ENTRY * thread_p,
    LOG_RCV * rcv
) 

function file_rv_extdata_set_next

int file_rv_extdata_set_next (
    THREAD_ENTRY * thread_p,
    LOG_RCV * rcv
) 

function file_rv_fhead_alloc

int file_rv_fhead_alloc (
    THREAD_ENTRY * thread_p,
    LOG_RCV * rcv
) 

function file_rv_fhead_convert_ftab_to_user_page

int file_rv_fhead_convert_ftab_to_user_page (
    THREAD_ENTRY * thread_p,
    LOG_RCV * rcv
) 

function file_rv_fhead_convert_user_to_ftab_page

int file_rv_fhead_convert_user_to_ftab_page (
    THREAD_ENTRY * thread_p,
    LOG_RCV * rcv
) 

function file_rv_fhead_dealloc

int file_rv_fhead_dealloc (
    THREAD_ENTRY * thread_p,
    LOG_RCV * rcv
) 

function file_rv_fhead_set_last_user_page_ftab

int file_rv_fhead_set_last_user_page_ftab (
    THREAD_ENTRY * thread_p,
    LOG_RCV * rcv
) 

function file_rv_fhead_sticky_page

int file_rv_fhead_sticky_page (
    THREAD_ENTRY * thread_p,
    LOG_RCV * rcv
) 

function file_rv_header_update_mark_deleted

int file_rv_header_update_mark_deleted (
    THREAD_ENTRY * thread_p,
    LOG_RCV * rcv
) 

function file_rv_partsect_clear

int file_rv_partsect_clear (
    THREAD_ENTRY * thread_p,
    LOG_RCV * rcv
) 

function file_rv_partsect_set

int file_rv_partsect_set (
    THREAD_ENTRY * thread_p,
    LOG_RCV * rcv
) 

function file_rv_perm_expand_redo

int file_rv_perm_expand_redo (
    THREAD_ENTRY * thread_p,
    LOG_RCV * rcv
) 

function file_rv_perm_expand_undo

int file_rv_perm_expand_undo (
    THREAD_ENTRY * thread_p,
    LOG_RCV * rcv
) 

function file_rv_set_tde_algorithm

int file_rv_set_tde_algorithm (
    THREAD_ENTRY * thread_p,
    LOG_RCV * rcv
) 

function file_rv_tracker_mark_heap_deleted

int file_rv_tracker_mark_heap_deleted (
    THREAD_ENTRY * thread_p,
    LOG_RCV * rcv,
    bool is_undo
) 

function file_rv_tracker_mark_heap_deleted_compensate_or_run_postpone

int file_rv_tracker_mark_heap_deleted_compensate_or_run_postpone (
    THREAD_ENTRY * thread_p,
    LOG_RCV * rcv
) 

function file_rv_tracker_reuse_heap

int file_rv_tracker_reuse_heap (
    THREAD_ENTRY * thread_p,
    LOG_RCV * rcv
) 

function file_rv_tracker_unregister_undo

int file_rv_tracker_unregister_undo (
    THREAD_ENTRY * thread_p,
    LOG_RCV * rcv
) 

function file_rv_user_page_mark_delete

int file_rv_user_page_mark_delete (
    THREAD_ENTRY * thread_p,
    LOG_RCV * rcv
) 

function file_rv_user_page_unmark_delete_logical

int file_rv_user_page_unmark_delete_logical (
    THREAD_ENTRY * thread_p,
    LOG_RCV * rcv
) 

function file_rv_user_page_unmark_delete_physical

int file_rv_user_page_unmark_delete_physical (
    THREAD_ENTRY * thread_p,
    LOG_RCV * rcv
) 

function file_spacedb

int file_spacedb (
    THREAD_ENTRY * thread_p,
    SPACEDB_FILES * spacedb
) 

function file_temp_preserve

void file_temp_preserve (
    THREAD_ENTRY * thread_p,
    const  VFID * vfid
) 

function file_temp_retire

int file_temp_retire (
    THREAD_ENTRY * thread_p,
    const  VFID * vfid
) 

function file_temp_retire_preserved

int file_temp_retire_preserved (
    THREAD_ENTRY * thread_p,
    const  VFID * vfid
) 

function file_temp_truncate

int file_temp_truncate (
    THREAD_ENTRY * thread_p,
    const  VFID * vfid
) 

function file_tempcache_drop_tran_temp_files

void file_tempcache_drop_tran_temp_files (
    THREAD_ENTRY * thread_p
) 

function file_tracker_check

DISK_ISVALID file_tracker_check (
    THREAD_ENTRY * thread_p
) 

function file_tracker_create

int file_tracker_create (
    THREAD_ENTRY * thread_p,
    VFID * vfid_tracker_out
) 

function file_tracker_dump

int file_tracker_dump (
    THREAD_ENTRY * thread_p,
    FILE * fp
) 

function file_tracker_dump_all_btree_capacities

int file_tracker_dump_all_btree_capacities (
    THREAD_ENTRY * thread_p,
    FILE * fp
) 

function file_tracker_dump_all_capacities

int file_tracker_dump_all_capacities (
    THREAD_ENTRY * thread_p,
    FILE * fp
) 

function file_tracker_dump_all_heap

int file_tracker_dump_all_heap (
    THREAD_ENTRY * thread_p,
    FILE * fp,
    bool dump_records
) 

function file_tracker_dump_all_heap_capacities

int file_tracker_dump_all_heap_capacities (
    THREAD_ENTRY * thread_p,
    FILE * fp
) 

function file_tracker_interruptable_iterate

int file_tracker_interruptable_iterate (
    THREAD_ENTRY * thread_p,
    FILE_TYPE desired_ftype,
    VFID * vfid,
    OID * class_oid
) 

function file_tracker_load

int file_tracker_load (
    THREAD_ENTRY * thread_p,
    const  VFID * vfid
) 

function file_tracker_reclaim_marked_deleted

int file_tracker_reclaim_marked_deleted (
    THREAD_ENTRY * thread_p
) 

function file_tracker_reuse_heap

int file_tracker_reuse_heap (
    THREAD_ENTRY * thread_p,
    const  OID * class_oid,
    HFID * hfid_out
) 

function file_type_to_string

const  char * file_type_to_string (
    FILE_TYPE fstruct_type
) 

function operator==

inline bool operator== (
    const  VFID & a,
    const  VFID & b
) 

function parse_target_vfid

bool parse_target_vfid (
    const  char * in_vfid_str,
    VFID * out_vfid
) 

function xfile_apply_tde_to_class_files

int xfile_apply_tde_to_class_files (
    THREAD_ENTRY * thread_p,
    const  OID * class_oid
) 

function xfile_tracker_clean_invalid_file

int xfile_tracker_clean_invalid_file (
    THREAD_ENTRY * thread_p,
    int * heap,
    int * heap_ovf,
    int * btree,
    int * btree_ovf
) 

function xfile_tracker_delete_target_file

int xfile_tracker_delete_target_file (
    THREAD_ENTRY * thread_p,
    const  char * target_vfid_str
) 

function xfile_tracker_dump_file_list

int xfile_tracker_dump_file_list (
    THREAD_ENTRY * thread_p,
    FILE * outfp,
    bool invalid_only
) 

Public Static Functions Documentation

function file_compare_track_items

static int file_compare_track_items (
    const  void * first,
    const  void * second
) 

function file_compare_vfids

static int file_compare_vfids (
    const  void * first,
    const  void * second
) 

function file_compare_vpids

static int file_compare_vpids (
    const  void * first,
    const  void * second
) 

function file_create_temp_internal

static int file_create_temp_internal (
    THREAD_ENTRY * thread_p,
    int npages,
    FILE_TYPE ftype,
    bool is_numerable,
    VFID * vfid_out
) 

function file_extdata_add_item_count

static int file_extdata_add_item_count (
    THREAD_ENTRY * thread_p,
    const  FILE_EXTENSIBLE_DATA * extdata,
    bool * stop,
    void * args
) 

function file_extdata_all_item_count

static int file_extdata_all_item_count (
    THREAD_ENTRY * thread_p,
    FILE_EXTENSIBLE_DATA * extdata,
    int * count
) 

function file_extdata_append

static void file_extdata_append (
    FILE_EXTENSIBLE_DATA * extdata,
    const  void * append_data
) 

function file_extdata_append_array

static void file_extdata_append_array (
    FILE_EXTENSIBLE_DATA * extdata,
    const  void * append_data,
    INT16 count
) 

function file_extdata_apply_funcs

static int file_extdata_apply_funcs (
    THREAD_ENTRY * thread_p,
    FILE_EXTENSIBLE_DATA * extdata_in,
    FILE_EXTDATA_FUNC f_extdata,
    void * f_extdata_args,
    FILE_EXTDATA_ITEM_FUNC f_item,
    void * f_item_args,
    bool for_write,
    FILE_EXTENSIBLE_DATA ** extdata_out,
    PAGE_PTR * page_out
) 

function file_extdata_at

static void * file_extdata_at (
    const  FILE_EXTENSIBLE_DATA * extdata,
    int index
) 

function file_extdata_can_merge

static bool file_extdata_can_merge (
    const  FILE_EXTENSIBLE_DATA * extdata_src,
    const  FILE_EXTENSIBLE_DATA * extdata_dest
) 

function file_extdata_collect_data_sectors_full

static int file_extdata_collect_data_sectors_full (
    THREAD_ENTRY * thread_p,
    const  void * item,
    int index_unused,
    bool * stop,
    void * args
) 

function file_extdata_collect_data_sectors_part

static int file_extdata_collect_data_sectors_part (
    THREAD_ENTRY * thread_p,
    const  void * item,
    int index_unused,
    bool * stop,
    void * args
) 

function file_extdata_collect_ftab_pages

static int file_extdata_collect_ftab_pages (
    THREAD_ENTRY * thread_p,
    const  FILE_EXTENSIBLE_DATA * extdata,
    bool * stop,
    void * args
) 

function file_extdata_end

static void * file_extdata_end (
    const  FILE_EXTENSIBLE_DATA * extdata
) 

function file_extdata_find_and_remove_item

static int file_extdata_find_and_remove_item (
    THREAD_ENTRY * thread_p,
    FILE_EXTENSIBLE_DATA * extdata_first,
    PAGE_PTR page_first,
    const  void * item,
    int (*)( const  void *, const  void *) compare_func,
    bool ordered,
    void * item_pop,
    VPID * vpid_merged
) 

function file_extdata_find_not_full

static int file_extdata_find_not_full (
    THREAD_ENTRY * thread_p,
    FILE_EXTENSIBLE_DATA ** extdata,
    PAGE_PTR * page_out,
    bool * found
) 

function file_extdata_find_nth_vpid

static int file_extdata_find_nth_vpid (
    THREAD_ENTRY * thread_p,
    const  FILE_EXTENSIBLE_DATA * extdata,
    bool * stop,
    void * args
) 

function file_extdata_find_nth_vpid_and_skip_marked

static int file_extdata_find_nth_vpid_and_skip_marked (
    THREAD_ENTRY * thread_p,
    const  void * data,
    int index,
    bool * stop,
    void * args
) 

function file_extdata_find_ordered

static void file_extdata_find_ordered (
    const  FILE_EXTENSIBLE_DATA * extdata,
    const  void * item_to_find,
    int (*)( const  void *, const  void *) compare_func,
    bool * found,
    int * position
) 

function file_extdata_func_for_search_ordered

static int file_extdata_func_for_search_ordered (
    THREAD_ENTRY * thread_p,
    const  FILE_EXTENSIBLE_DATA * extdata,
    bool * stop,
    void * args
) 

function file_extdata_init

static void file_extdata_init (
    INT16 item_size,
    INT16 max_size,
    FILE_EXTENSIBLE_DATA * extdata
) 

function file_extdata_insert_at

static void file_extdata_insert_at (
    FILE_EXTENSIBLE_DATA * extdata,
    int position,
    int count,
    const  void * data
) 

function file_extdata_is_empty

static bool file_extdata_is_empty (
    const  FILE_EXTENSIBLE_DATA * extdata
) 

function file_extdata_is_full

static bool file_extdata_is_full (
    const  FILE_EXTENSIBLE_DATA * extdata
) 

function file_extdata_item_count

static INT16 file_extdata_item_count (
    const  FILE_EXTENSIBLE_DATA * extdata
) 

static int file_extdata_item_func_for_search (
    THREAD_ENTRY * thread_p,
    const  void * item,
    int index,
    bool * stop,
    void * args
) 

function file_extdata_max_size

static int file_extdata_max_size (
    const  FILE_EXTENSIBLE_DATA * extdata
) 

function file_extdata_merge_ordered

static void file_extdata_merge_ordered (
    const  FILE_EXTENSIBLE_DATA * extdata_src,
    FILE_EXTENSIBLE_DATA * extdata_dest,
    int (*)( const  void *, const  void *) compare_func
) 

function file_extdata_merge_pages

static bool file_extdata_merge_pages (
    THREAD_ENTRY * thread_p,
    const  FILE_EXTENSIBLE_DATA * extdata_src,
    const  PAGE_PTR page_src,
    FILE_EXTENSIBLE_DATA * extdata_dest,
    PAGE_PTR page_dest,
    int (*)( const  void *, const  void *) compare_func,
    bool ordered
) 

function file_extdata_merge_unordered

static void file_extdata_merge_unordered (
    const  FILE_EXTENSIBLE_DATA * extdata_src,
    FILE_EXTENSIBLE_DATA * extdata_dest
) 

function file_extdata_remaining_capacity

static INT16 file_extdata_remaining_capacity (
    const  FILE_EXTENSIBLE_DATA * extdata
) 

function file_extdata_remove_at

static void file_extdata_remove_at (
    FILE_EXTENSIBLE_DATA * extdata,
    int position,
    int count
) 

function file_extdata_search_item

static int file_extdata_search_item (
    THREAD_ENTRY * thread_p,
    FILE_EXTENSIBLE_DATA ** extdata,
    const  void * item_to_find,
    int (*)( const  void *, const  void *) compare_func,
    bool is_ordered,
    bool for_write,
    bool * found,
    int * position,
    PAGE_PTR * page_extdata
) 

function file_extdata_size

static int file_extdata_size (
    const  FILE_EXTENSIBLE_DATA * extdata
) 

function file_extdata_start

static void * file_extdata_start (
    const  FILE_EXTENSIBLE_DATA * extdata
) 

function file_extdata_update_item

static void file_extdata_update_item (
    THREAD_ENTRY * thread_p,
    PAGE_PTR page_extdata,
    const  void * item_newval,
    int index_item,
    FILE_EXTENSIBLE_DATA * extdata
) 

function file_file_map_set_tde_algorithm

static int file_file_map_set_tde_algorithm (
    THREAD_ENTRY * thread_p,
    PAGE_PTR * page,
    bool * stop,
    void * args
) 

function file_full_table_extdata_dump

static int file_full_table_extdata_dump (
    THREAD_ENTRY * thread_p,
    const  FILE_EXTENSIBLE_DATA * extdata,
    bool * stop,
    void * args
) 

function file_full_table_item_dump

static int file_full_table_item_dump (
    THREAD_ENTRY * thread_p,
    const  void * data,
    int index,
    bool * stop,
    void * args
) 

function file_get_tde_algorithm_internal

static TDE_ALGORITHM file_get_tde_algorithm_internal (
    const  FILE_HEADER * fhead
) 

function file_get_tempcache_entry_index

static int file_get_tempcache_entry_index (
    THREAD_ENTRY * thread_p
) 

function file_header_alloc

static void file_header_alloc (
    FILE_HEADER * fhead,
    FILE_ALLOC_TYPE alloc_type,
    bool was_empty,
    bool is_full
) 

function file_header_copy

static int file_header_copy (
    THREAD_ENTRY * thread_p,
    const  VFID * vfid,
    FILE_HEADER * fhead_copy
) 

function file_header_dealloc

static void file_header_dealloc (
    FILE_HEADER * fhead,
    FILE_ALLOC_TYPE alloc_type,
    bool is_empty,
    bool was_full
) 

function file_header_dump

static void file_header_dump (
    THREAD_ENTRY * thread_p,
    const  FILE_HEADER * fhead,
    FILE * fp
) 

function file_header_dump_descriptor

static void file_header_dump_descriptor (
    THREAD_ENTRY * thread_p,
    const  FILE_HEADER * fhead,
    FILE * fp
) 

function file_header_init

static void file_header_init (
    FILE_HEADER * fhead
) 

function file_header_sanity_check

static void file_header_sanity_check (
    THREAD_ENTRY * thread_p,
    FILE_HEADER * fhead
) 

function file_header_update_mark_deleted

static void file_header_update_mark_deleted (
    THREAD_ENTRY * thread_p,
    PAGE_PTR page_fhead,
    int delta
) 

function file_init_page_type_internal

static int file_init_page_type_internal (
    THREAD_ENTRY * thread_p,
    PAGE_PTR page,
    PAGE_TYPE ptype,
    bool is_temp
) 

function file_log_extdata_add

static void file_log_extdata_add (
    THREAD_ENTRY * thread_p,
    const  FILE_EXTENSIBLE_DATA * extdata,
    PAGE_PTR page,
    int position,
    int count,
    const  void * data
) 

function file_log_extdata_remove

static void file_log_extdata_remove (
    THREAD_ENTRY * thread_p,
    const  FILE_EXTENSIBLE_DATA * extdata,
    PAGE_PTR page,
    int position,
    int count
) 

function file_log_extdata_set_next

static void file_log_extdata_set_next (
    THREAD_ENTRY * thread_p,
    const  FILE_EXTENSIBLE_DATA * extdata,
    PAGE_PTR page,
    const  VPID * vpid_next
) 

function file_log_fhead_alloc

static void file_log_fhead_alloc (
    THREAD_ENTRY * thread_p,
    PAGE_PTR page_fhead,
    FILE_ALLOC_TYPE alloc_type,
    bool was_empty,
    bool is_full
) 

function file_log_fhead_dealloc

static void file_log_fhead_dealloc (
    THREAD_ENTRY * thread_p,
    PAGE_PTR page_fhead,
    FILE_ALLOC_TYPE alloc_type,
    bool is_empty,
    bool was_full
) 

function file_numerable_add_page

static int file_numerable_add_page (
    THREAD_ENTRY * thread_p,
    PAGE_PTR page_fhead,
    const  VPID * vpid
) 

function file_partial_table_extdata_dump

static int file_partial_table_extdata_dump (
    THREAD_ENTRY * thread_p,
    const  FILE_EXTENSIBLE_DATA * extdata,
    bool * stop,
    void * args
) 

function file_partial_table_item_dump

static int file_partial_table_item_dump (
    THREAD_ENTRY * thread_p,
    const  void * data,
    int index,
    bool * stop,
    void * args
) 

function file_partsect_alloc

static bool file_partsect_alloc (
    FILE_PARTIAL_SECTOR * partsect,
    VPID * vpid_out,
    int * offset_out
) 

function file_partsect_clear_bit

static void file_partsect_clear_bit (
    FILE_PARTIAL_SECTOR * partsect,
    int offset
) 

function file_partsect_is_bit_set

static bool file_partsect_is_bit_set (
    FILE_PARTIAL_SECTOR * partsect,
    int offset
) 

function file_partsect_is_empty

static bool file_partsect_is_empty (
    FILE_PARTIAL_SECTOR * partsect
) 

function file_partsect_is_full

static bool file_partsect_is_full (
    FILE_PARTIAL_SECTOR * partsect
) 

function file_partsect_pageid_to_offset

static int file_partsect_pageid_to_offset (
    FILE_PARTIAL_SECTOR * partsect,
    PAGEID pageid
) 

function file_partsect_set_bit

static void file_partsect_set_bit (
    FILE_PARTIAL_SECTOR * partsect,
    int offset
) 

function file_perm_alloc

static int file_perm_alloc (
    THREAD_ENTRY * thread_p,
    PAGE_PTR page_fhead,
    FILE_ALLOC_TYPE alloc_type,
    VPID * vpid_alloc_out
) 

function file_perm_dealloc

static int file_perm_dealloc (
    THREAD_ENTRY * thread_p,
    PAGE_PTR page_fhead,
    const  VPID * vpid_dealloc,
    FILE_ALLOC_TYPE alloc_type
) 

function file_perm_expand

static int file_perm_expand (
    THREAD_ENTRY * thread_p,
    PAGE_PTR page_fhead
) 

function file_print_name_of_class

static void file_print_name_of_class (
    THREAD_ENTRY * thread_p,
    FILE * fp,
    const  OID * class_oid_p
) 

function file_rv_dealloc_internal

static int file_rv_dealloc_internal (
    THREAD_ENTRY * thread_p,
    LOG_RCV * rcv,
    bool compensate_or_run_postpone
) 

function file_rv_partsect_update

static int file_rv_partsect_update (
    THREAD_ENTRY * thread_p,
    LOG_RCV * rcv,
    bool set
) 

function file_sector_map_dealloc

static int file_sector_map_dealloc (
    THREAD_ENTRY * thread_p,
    const  void * data,
    int index,
    bool * stop,
    void * args
) 

function file_sector_map_dealloc_temp

static int file_sector_map_dealloc_temp (
    THREAD_ENTRY * thread_p,
    const  void * data,
    int index,
    bool * stop,
    void * args
) 

function file_sector_map_pages

static int file_sector_map_pages (
    THREAD_ENTRY * thread_p,
    const  void * data,
    int index,
    bool * stop,
    void * args
) 

function file_set_tde_algorithm

static int file_set_tde_algorithm (
    THREAD_ENTRY * thread_p,
    const  VFID * vfid,
    TDE_ALGORITHM tde_algo
) 

function file_set_tde_algorithm_internal

static void file_set_tde_algorithm_internal (
    FILE_HEADER * fhead,
    TDE_ALGORITHM tde_algo
) 

function file_table_add_full_sector

static int file_table_add_full_sector (
    THREAD_ENTRY * thread_p,
    PAGE_PTR page_fhead,
    const  VSID * vsid
) 

function file_table_append_full_sector_page

static int file_table_append_full_sector_page (
    THREAD_ENTRY * thread_p,
    PAGE_PTR page_fhead,
    const  VPID * vpid_new
) 

function file_table_check

static DISK_ISVALID file_table_check (
    THREAD_ENTRY * thread_p,
    const  VFID * vfid,
    DISK_VOLMAP_CLONE * disk_map_clone
) 

function file_table_check_page_is_in_sectors

static int file_table_check_page_is_in_sectors (
    THREAD_ENTRY * thread_p,
    const  void * data,
    int index,
    bool * stop,
    void * args
) 

function file_table_collect_all_vsids

static int file_table_collect_all_vsids (
    THREAD_ENTRY * thread_p,
    PAGE_PTR page_fhead,
    FILE_VSID_COLLECTOR * collector_out
) 

function file_table_collect_ftab_pages

static int file_table_collect_ftab_pages (
    THREAD_ENTRY * thread_p,
    PAGE_PTR page_fhead,
    bool collect_numerable,
    FILE_FTAB_COLLECTOR * collector_out
) 

function file_table_collect_vsid

static int file_table_collect_vsid (
    THREAD_ENTRY * thread_p,
    const  void * item,
    int index_unused,
    bool * stop,
    void * args
) 

function file_table_collector_has_page

static bool file_table_collector_has_page (
    FILE_FTAB_COLLECTOR * collector,
    VPID * vpid
) 

function file_table_dump

static int file_table_dump (
    THREAD_ENTRY * thread_p,
    const  FILE_HEADER * fhead,
    FILE * fp
) 

function file_table_move_partial_sectors_to_header

static int file_table_move_partial_sectors_to_header (
    THREAD_ENTRY * thread_p,
    PAGE_PTR page_fhead,
    FILE_ALLOC_TYPE alloc_type,
    VPID * vpid_alloc_out
) 

function file_temp_alloc

static int file_temp_alloc (
    THREAD_ENTRY * thread_p,
    PAGE_PTR page_fhead,
    FILE_ALLOC_TYPE alloc_type,
    VPID * vpid_alloc_out
) 

function file_temp_reset_user_pages

static int file_temp_reset_user_pages (
    THREAD_ENTRY * thread_p,
    const  VFID * vfid
) 

function file_temp_retire_internal

static int file_temp_retire_internal (
    THREAD_ENTRY * thread_p,
    const  VFID * vfid,
    bool was_preserved
) 

function file_temp_set_type

static int file_temp_set_type (
    THREAD_ENTRY * thread_p,
    VFID * vfid,
    FILE_TYPE ftype
) 

function file_tempcache_alloc_entry

static int file_tempcache_alloc_entry (
    FILE_TEMPCACHE_ENTRY ** entry
) 

function file_tempcache_cache_or_drop_entries

static void file_tempcache_cache_or_drop_entries (
    THREAD_ENTRY * thread_p,
    FILE_TEMPCACHE_ENTRY ** entries
) 

function file_tempcache_check_duplicate

static bool file_tempcache_check_duplicate (
    THREAD_ENTRY * thread_p,
    FILE_TEMPCACHE_ENTRY * entry,
    bool is_numerable
) 

function file_tempcache_check_lock

static void file_tempcache_check_lock (
    void
) 

function file_tempcache_dump

static void file_tempcache_dump (
    FILE * fp
) 

function file_tempcache_final

static void file_tempcache_final (
    void
) 

function file_tempcache_free_entry_list

static void file_tempcache_free_entry_list (
    FILE_TEMPCACHE_ENTRY ** list
) 

function file_tempcache_get

static int file_tempcache_get (
    THREAD_ENTRY * thread_p,
    FILE_TYPE ftype,
    bool numerable,
    FILE_TEMPCACHE_ENTRY ** entry
) 

function file_tempcache_init

static int file_tempcache_init (
    void
) 

function file_tempcache_lock

static void file_tempcache_lock (
    void
) 

function file_tempcache_lock_tran_entry

static void file_tempcache_lock_tran_entry (
    FILE_TEMPCACHE_TRAN_ENTRY * tran_entry
) 

function file_tempcache_pop_tran_file

static FILE_TEMPCACHE_ENTRY * file_tempcache_pop_tran_file (
    THREAD_ENTRY * thread_p,
    const  VFID * vfid
) 

function file_tempcache_push_tran_file

static void file_tempcache_push_tran_file (
    THREAD_ENTRY * thread_p,
    FILE_TEMPCACHE_ENTRY * entry
) 

function file_tempcache_put

static bool file_tempcache_put (
    THREAD_ENTRY * thread_p,
    FILE_TEMPCACHE_ENTRY * entry
) 

function file_tempcache_retire_entry

static void file_tempcache_retire_entry (
    FILE_TEMPCACHE_ENTRY * entry
) 

function file_tempcache_unlock

static void file_tempcache_unlock (
    void
) 

function file_tempcache_unlock_tran_entry

static void file_tempcache_unlock_tran_entry (
    FILE_TEMPCACHE_TRAN_ENTRY * tran_entry
) 

function file_tracker_apply_to_file

static int file_tracker_apply_to_file (
    THREAD_ENTRY * thread_p,
    const  VFID * vfid,
    PGBUF_LATCH_MODE mode,
    FILE_TRACK_ITEM_FUNC func,
    void * args
) 

function file_tracker_get_and_protect

static int file_tracker_get_and_protect (
    THREAD_ENTRY * thread_p,
    FILE_TYPE desired_type,
    FILE_TRACK_ITEM * item,
    OID * class_oid,
    bool * stop
) 

function file_tracker_init_page

static int file_tracker_init_page (
    THREAD_ENTRY * thread_p,
    PAGE_PTR page,
    void * args
) 

function file_tracker_item_check

static int file_tracker_item_check (
    THREAD_ENTRY * thread_p,
    PAGE_PTR page_of_item,
    FILE_EXTENSIBLE_DATA * extdata,
    int index_item,
    bool * stop,
    void * args
) 

function file_tracker_item_collect_invalid_file

static int file_tracker_item_collect_invalid_file (
    THREAD_ENTRY * thread_p,
    PAGE_PTR page_of_item,
    FILE_EXTENSIBLE_DATA * extdata,
    int index_item,
    bool * stop,
    void * args
) 

function file_tracker_item_delete_target_file

static int file_tracker_item_delete_target_file (
    THREAD_ENTRY * thread_p,
    PAGE_PTR page_of_item,
    FILE_EXTENSIBLE_DATA * extdata,
    int index_item,
    bool * stop,
    void * args
) 

function file_tracker_item_dump

static int file_tracker_item_dump (
    THREAD_ENTRY * thread_p,
    PAGE_PTR page_of_item,
    FILE_EXTENSIBLE_DATA * extdata,
    int index_item,
    bool * stop,
    void * args
) 

function file_tracker_item_dump_btree_capacity

static int file_tracker_item_dump_btree_capacity (
    THREAD_ENTRY * thread_p,
    PAGE_PTR page_of_item,
    FILE_EXTENSIBLE_DATA * extdata,
    int index_item,
    bool * stop,
    void * args
) 

function file_tracker_item_dump_capacity

static int file_tracker_item_dump_capacity (
    THREAD_ENTRY * thread_p,
    PAGE_PTR page_of_item,
    FILE_EXTENSIBLE_DATA * extdata,
    int index_item,
    bool * stop,
    void * args
) 

function file_tracker_item_dump_file

static int file_tracker_item_dump_file (
    THREAD_ENTRY * thread_p,
    PAGE_PTR page_of_item,
    FILE_EXTENSIBLE_DATA * extdata,
    int index_item,
    bool * stop,
    void * args
) 

function file_tracker_item_dump_heap

static int file_tracker_item_dump_heap (
    THREAD_ENTRY * thread_p,
    PAGE_PTR page_of_item,
    FILE_EXTENSIBLE_DATA * extdata,
    int index_item,
    bool * stop,
    void * args
) 

function file_tracker_item_dump_heap_capacity

static int file_tracker_item_dump_heap_capacity (
    THREAD_ENTRY * thread_p,
    PAGE_PTR page_of_item,
    FILE_EXTENSIBLE_DATA * extdata,
    int index_item,
    bool * stop,
    void * args
) 

function file_tracker_item_mark_heap_deleted

static int file_tracker_item_mark_heap_deleted (
    THREAD_ENTRY * thread_p,
    PAGE_PTR page_of_item,
    FILE_EXTENSIBLE_DATA * extdata,
    int index_item,
    bool * stop,
    void * ignore_args
) 

function file_tracker_item_reuse_heap

static int file_tracker_item_reuse_heap (
    THREAD_ENTRY * thread_p,
    PAGE_PTR page_of_item,
    FILE_EXTENSIBLE_DATA * extdata,
    int index_item,
    bool * stop,
    void * args
) 

function file_tracker_item_spacedb

static int file_tracker_item_spacedb (
    THREAD_ENTRY * thread_p,
    PAGE_PTR page_of_item,
    FILE_EXTENSIBLE_DATA * extdata,
    int index_item,
    bool * stop,
    void * args
) 

function file_tracker_map

static int file_tracker_map (
    THREAD_ENTRY * thread_p,
    PGBUF_LATCH_MODE latch_mode,
    FILE_TRACK_ITEM_FUNC func,
    void * args
) 

function file_tracker_register

static int file_tracker_register (
    THREAD_ENTRY * thread_p,
    const  VFID * vfid,
    FILE_TYPE ftype,
    FILE_TRACK_METADATA * metadata
) 

function file_tracker_register_internal

static int file_tracker_register_internal (
    THREAD_ENTRY * thread_p,
    PAGE_PTR page_track_head,
    const  FILE_TRACK_ITEM * item
) 

function file_tracker_spacedb

static int file_tracker_spacedb (
    THREAD_ENTRY * thread_p,
    SPACEDB_FILES * spacedb
) 

function file_tracker_unregister

static int file_tracker_unregister (
    THREAD_ENTRY * thread_p,
    const  VFID * vfid
) 

function file_user_page_table_extdata_dump

static int file_user_page_table_extdata_dump (
    THREAD_ENTRY * thread_p,
    const  FILE_EXTENSIBLE_DATA * extdata,
    bool * stop,
    void * args
) 

function file_user_page_table_item_dump

static int file_user_page_table_item_dump (
    THREAD_ENTRY * thread_p,
    const  void * data,
    int index,
    bool * stop,
    void * args
) 

Macro Definition Documentation

define FILE_ALLOC_TYPE_STRING

#define FILE_ALLOC_TYPE_STRING (
    alloc_type
) `((alloc_type) == FILE_ALLOC_USER_PAGE ? "alloc user page" : "alloc table page" )`

define FILE_CACHE_LAST_FIND_NTH

#define FILE_CACHE_LAST_FIND_NTH (
    fh,
    thread_p
) `/* multi line expression */`

define FILE_EXTDATA_AS_ARGS

#define FILE_EXTDATA_AS_ARGS (
    extdata
) `VPID_AS_ARGS (&( extdata )->vpid_next), ( extdata )->max_size, ( extdata )->size_of_item, ( extdata )->n_items`

define FILE_EXTDATA_HEADER_ALIGNED_SIZE

#define FILE_EXTDATA_HEADER_ALIGNED_SIZE `( DB_ALIGN ( sizeof ( FILE_EXTENSIBLE_DATA ), MAX_ALIGNMENT ))`

define FILE_EXTDATA_MSG

#define FILE_EXTDATA_MSG (
    name
) `"\t" name ": { vpid_next = %d|%d, max_size = %d, item_size = %d, n_items = %d } \ n"`

define FILE_FLAG_ENCRYPTED_AES

#define FILE_FLAG_ENCRYPTED_AES `0x4    /* Is file encrypted  using  AES */`

define FILE_FLAG_ENCRYPTED_ARIA

#define FILE_FLAG_ENCRYPTED_ARIA `0x8   /* Is file encrypted  using  ARIA */`

define FILE_FLAG_ENCRYPTED_MASK

#define FILE_FLAG_ENCRYPTED_MASK `0x0000000c    /* 0x4 + 0x8 */`

define FILE_FLAG_NUMERABLE

#define FILE_FLAG_NUMERABLE `0x1    /* Is file numerable */`

define FILE_FLAG_TEMPORARY

#define FILE_FLAG_TEMPORARY `0x2    /* Is file temporary */`

define FILE_GET_HEADER_VPID

#define FILE_GET_HEADER_VPID (
    vfid,
    vpid
) `( vpid )->volid = ( vfid )->volid; ( vpid )->pageid = ( vfid )->fileid`

define FILE_GET_TRACKER_LOCK_MODE

#define FILE_GET_TRACKER_LOCK_MODE (
    file_type
) `(((file_type) == FILE_BTREE ) ? IX_LOCK : SCH_S_LOCK )`

define FILE_HEADER_ALIGNED_SIZE

#define FILE_HEADER_ALIGNED_SIZE `(( INT16 ) ( DB_ALIGN ( sizeof ( FILE_HEADER ), MAX_ALIGNMENT )))`

define FILE_HEADER_GET_FULL_FTAB

#define FILE_HEADER_GET_FULL_FTAB (
    fh,
    fulltab
) `/* multi line expression */`

define FILE_HEADER_GET_PART_FTAB

#define FILE_HEADER_GET_PART_FTAB (
    fh,
    parttab
) `/* multi line expression */`

define FILE_HEADER_GET_USER_PAGE_FTAB

#define FILE_HEADER_GET_USER_PAGE_FTAB (
    fh,
    pagetab
) `/* multi line expression */`

define FILE_HEAD_ALLOC_AS_ARGS

#define FILE_HEAD_ALLOC_AS_ARGS (
    fhead
) `/* multi line expression */`

define FILE_HEAD_ALLOC_MSG

#define FILE_HEAD_ALLOC_MSG `/* multi line expression */`

define FILE_HEAD_FULL_AS_ARGS

#define FILE_HEAD_FULL_AS_ARGS (
    fhead
) `/* multi line expression */`

define FILE_HEAD_FULL_MSG

#define FILE_HEAD_FULL_MSG `/* multi line expression */`

define FILE_IS_NUMERABLE

#define FILE_IS_NUMERABLE (
    fh
) `((( fh )->file_flags & FILE_FLAG_NUMERABLE ) != 0)`

define FILE_IS_TDE_ENCRYPTED

#define FILE_IS_TDE_ENCRYPTED (
    fh
) `((( fh )->file_flags & FILE_FLAG_ENCRYPTED_MASK ) != 0)`

define FILE_IS_TEMPORARY

#define FILE_IS_TEMPORARY (
    fh
) `((( fh )->file_flags & FILE_FLAG_TEMPORARY ) != 0)`

define FILE_NUMERABLE_REGULAR_STRING

#define FILE_NUMERABLE_REGULAR_STRING (
    is_numerable
) `(( is_numerable ) ? "numerable" : "regular")`

define FILE_PARTSECT_AS_ARGS

#define FILE_PARTSECT_AS_ARGS (
    ps
) `VSID_AS_ARGS (&( ps )-> vsid ), ( long  long  unsigned  int ) ( ps )-> page_bitmap`

define FILE_PARTSECT_MSG

#define FILE_PARTSECT_MSG (
    name
) `"\t" name ": { vsid = %d|%d, page bitmap = " BIT64_HEXA_PRINT_FORMAT " } \n"`

define FILE_PERM_TEMP_STRING

#define FILE_PERM_TEMP_STRING (
    is_temp
) `((is_temp) ? "temporary" : "permanent")`

define FILE_RV_DEALLOC_COMPENSATE

#define FILE_RV_DEALLOC_COMPENSATE `true`

define FILE_RV_DEALLOC_RUN_POSTPONE

#define FILE_RV_DEALLOC_RUN_POSTPONE `false`

define FILE_TABLESPACE_AS_ARGS

#define FILE_TABLESPACE_AS_ARGS (
    tabspace
) `/* multi line expression */`

define FILE_TABLESPACE_DEFAULT_MAX_EXPAND

#define FILE_TABLESPACE_DEFAULT_MAX_EXPAND `( DISK_SECTOR_NPAGES * DB_PAGESIZE * 1024); /* 1 k sectors */`

define FILE_TABLESPACE_DEFAULT_MIN_EXPAND

#define FILE_TABLESPACE_DEFAULT_MIN_EXPAND `( DISK_SECTOR_NPAGES * DB_PAGESIZE );   /* one  sector */`

define FILE_TABLESPACE_DEFAULT_RATIO_EXPAND

#define FILE_TABLESPACE_DEFAULT_RATIO_EXPAND `(( float ) 0.01)  /* 1% of current size */`

define FILE_TABLESPACE_FOR_PERM_NPAGES

#define FILE_TABLESPACE_FOR_PERM_NPAGES (
    tabspace,
    npages
) `/* multi line expression */`

define FILE_TABLESPACE_FOR_TEMP_NPAGES

#define FILE_TABLESPACE_FOR_TEMP_NPAGES (
    tabspace,
    npages
) `/* multi line expression */`

define FILE_TABLESPACE_MSG

#define FILE_TABLESPACE_MSG `"\ttablespace = { init_size = % lld , expand_ratio = %f, expand_min_size = %d, expand_max_size = %d } \ n"`

define FILE_TEMPCACHE_AS_ARGS

#define FILE_TEMPCACHE_AS_ARGS `/* multi line expression */`

define FILE_TEMPCACHE_ENTRY_AS_ARGS

#define FILE_TEMPCACHE_ENTRY_AS_ARGS (
    ent
) `ent, VFID_AS_ARGS (&(ent)-> vfid ), file_type_to_string ((ent)->ftype)`

define FILE_TEMPCACHE_ENTRY_MSG

#define FILE_TEMPCACHE_ENTRY_MSG `"%p, VFID %d|%d, % s"`

define FILE_TEMPCACHE_MSG

#define FILE_TEMPCACHE_MSG `/* multi line expression */`

define FILE_TRACK_ITEM_AS_ARGS

#define FILE_TRACK_ITEM_AS_ARGS (
    item
) `(item)->volid, (item)->fileid, file_type_to_string (( FILE_TYPE ) (item)->type)`

define FILE_TRACK_ITEM_MSG

#define FILE_TRACK_ITEM_MSG `"VFID %d|%d, % s"`

define FILE_TYPE_CAN_BE_NUMERABLE

#define FILE_TYPE_CAN_BE_NUMERABLE (
    ftype
) `/* multi line expression */`

define FILE_TYPE_IS_ALWAYS_TEMP

#define FILE_TYPE_IS_ALWAYS_TEMP (
    ftype
) `/* multi line expression */`

define FILE_TYPE_IS_NEVER_TEMP

#define FILE_TYPE_IS_NEVER_TEMP (
    ftype
) `(! FILE_TYPE_IS_ALWAYS_TEMP (ftype) && ! FILE_TYPE_IS_SOMETIMES_TEMP (ftype))`

define FILE_TYPE_IS_SOMETIMES_TEMP

#define FILE_TYPE_IS_SOMETIMES_TEMP (
    ftype
) `/* multi line expression */`

define FILE_USER_PAGE_CLEAR_MARK_DELETED

#define FILE_USER_PAGE_CLEAR_MARK_DELETED (
    vpid
) `(( VPID *) vpid )->pageid &= ~ FILE_USER_PAGE_MARK_DELETE_FLAG`

define FILE_USER_PAGE_IS_MARKED_DELETED

#define FILE_USER_PAGE_IS_MARKED_DELETED (
    vpid
) `(((( VPID *) vpid )->pageid & FILE_USER_PAGE_MARK_DELETE_FLAG ) != 0)`

define FILE_USER_PAGE_MARK_DELETED

#define FILE_USER_PAGE_MARK_DELETED (
    vpid
) `(( VPID *) vpid )->pageid |= FILE_USER_PAGE_MARK_DELETE_FLAG`

define FILE_USER_PAGE_MARK_DELETE_FLAG

#define FILE_USER_PAGE_MARK_DELETE_FLAG `(( PAGEID ) 0x80000000)`

define LOG_BOOL_COUNT

#define LOG_BOOL_COUNT `3`

define LOG_BOOL_COUNT

#define LOG_BOOL_COUNT `3`

define LOG_DATA_SIZE

#define LOG_DATA_SIZE `( sizeof ( VFID ) + sizeof ( VPID ))`

define UNDO_DATA_SIZE

#define UNDO_DATA_SIZE `( sizeof ( VFID ) + sizeof ( VPID ))`

define file_log

#define file_log (
    func,
    msg,
    ...
) `if ( file_Logging ) \ _er_log_debug ( ARG_FILE_LINE , "FILE " func " " LOG_THREAD_TRAN_MSG ": " msg "\n", \ LOG_THREAD_TRAN_ARGS ( thread_get_thread_entry_info ()), __VA_ARGS__ )`


The documentation for this class was generated from the following file cubrid/src/storage/file_manager.c