File page_buffer.h
FileList > cubrid > src > storage > page_buffer.h
Go to the source code of this file
#include "config.h"
#include "error_manager.h"
#include "disk_manager.h"
#include "lock_manager.h"
#include "log_lsa.hpp"
#include "mem_block.hpp"
#include "perf_monitor.h"
#include "storage_common.h"
#include "tde.h"
Classes
Public Types
Public Attributes
Public Functions
| Type |
Name |
| void |
pgbuf_adjust_quotas (THREAD_ENTRY * thread_p)
|
| bool |
pgbuf_assign_flushed_pages (THREAD_ENTRY * thread_p)
|
| int |
pgbuf_assign_private_lru (THREAD_ENTRY * thread_p)
|
| void |
pgbuf_attach_watcher_debug (THREAD_ENTRY * thread_p, PAGE_PTR pgptr, PGBUF_LATCH_MODE latch_mode, HFID * hfid, PGBUF_WATCHER * watcher, const char * file, const int line)
|
| bool |
pgbuf_check_page_ptype (THREAD_ENTRY * thread_p, PAGE_PTR pgptr, PAGE_TYPE ptype)
|
| bool |
pgbuf_check_page_type_no_error (THREAD_ENTRY * thread_p, PAGE_PTR pgptr, PAGE_TYPE ptype)
|
| int |
pgbuf_compare_vpid (const void * key_vpid1, const void * key_vpid2)
|
| void * |
pgbuf_copy_from_area (THREAD_ENTRY * thread_p, const VPID * vpid, int start_offset, int length, void * area, bool do_fetch, TDE_ALGORITHM tde_algo)
|
| void * |
pgbuf_copy_to_area (THREAD_ENTRY * thread_p, const VPID * vpid, int start_offset, int length, void * area, bool do_fetch)
|
| void |
pgbuf_daemons_destroy ()
|
| void |
pgbuf_daemons_get_stats (UINT64 * stats_out)
|
| void |
pgbuf_daemons_init ()
|
| void |
pgbuf_dealloc_page (THREAD_ENTRY * thread_p, PAGE_PTR page_dealloc)
|
| int |
pgbuf_dealloc_temp_page (THREAD_ENTRY * thread_p, PAGE_PTR pgptr, bool need_free)
|
| void |
pgbuf_direct_victims_maintenance (THREAD_ENTRY * thread_p)
|
| void |
pgbuf_dump_if_any_fixed (void)
|
| void |
pgbuf_finalize (void)
|
| PAGE_PTR |
pgbuf_fix_debug (THREAD_ENTRY * thread_p, const VPID * vpid, PAGE_FETCH_MODE fetch_mode, PGBUF_LATCH_MODE requestmode, PGBUF_LATCH_CONDITION condition, const char * caller_file, int caller_line, const char * caller_func)
|
| int |
pgbuf_fix_if_not_deallocated_with_caller (THREAD_ENTRY * thead_p, const VPID * vpid, PGBUF_LATCH_MODE latch_mode, PGBUF_LATCH_CONDITION latch_condition, PAGE_PTR * page, const char * caller_file, int caller_line, const char * caller_func)
|
| PAGE_PTR |
pgbuf_fix_with_retry (THREAD_ENTRY * thread_p, const VPID * vpid, PAGE_FETCH_MODE fetch_mode, PGBUF_LATCH_MODE request_mode, int retry)
|
| void |
pgbuf_flush (THREAD_ENTRY * thread_p, PAGE_PTR pgptr, bool free_page)
|
| int |
pgbuf_flush_all (THREAD_ENTRY * thread_p, VOLID volid)
|
| int |
pgbuf_flush_all_unfixed (THREAD_ENTRY * thread_p, VOLID volid)
|
| int |
pgbuf_flush_all_unfixed_and_set_lsa_as_null (THREAD_ENTRY * thread_p, VOLID volid)
|
| int |
pgbuf_flush_checkpoint (THREAD_ENTRY * thread_p, const LOG_LSA * flush_upto_lsa, const LOG_LSA * prev_chkpt_redo_lsa, LOG_LSA * smallest_lsa, int * flushed_page_cnt)
|
| int |
pgbuf_flush_control_from_dirty_ratio (void)
|
| void |
pgbuf_flush_if_requested (THREAD_ENTRY * thread_p, PAGE_PTR page)
|
| int |
pgbuf_flush_victim_candidates (THREAD_ENTRY * thread_p, float flush_ratio, PERF_UTIME_TRACKER * time_tracker, bool * stop)
|
| PAGE_PTR |
pgbuf_flush_with_wal (THREAD_ENTRY * thread_p, PAGE_PTR pgptr)
|
| void |
pgbuf_force_to_check_for_interrupts (void)
|
| int |
pgbuf_get_condition_for_ordered_fix (const VPID * vpid_new_page, const VPID * vpid_fixed_page, const HFID * hfid)
|
| int |
pgbuf_get_fix_count (PAGE_PTR pgptr)
|
| int |
pgbuf_get_hold_count (THREAD_ENTRY * thread_p)
|
| PGBUF_LATCH_MODE |
pgbuf_get_latch_mode (PAGE_PTR pgptr)
|
| LOG_LSA * |
pgbuf_get_lsa (PAGE_PTR pgptr)
|
| PAGEID |
pgbuf_get_page_id (PAGE_PTR pgptr)
|
| PAGE_TYPE |
pgbuf_get_page_ptype (THREAD_ENTRY * thread_p, PAGE_PTR pgptr)
|
| PERF_PAGE_TYPE |
pgbuf_get_page_type_for_stat (THREAD_ENTRY * thread_p, PAGE_PTR pgptr)
|
| TDE_ALGORITHM |
pgbuf_get_tde_algorithm (PAGE_PTR pgptr)
|
| VOLID |
pgbuf_get_volume_id (PAGE_PTR pgptr)
|
| const char * |
pgbuf_get_volume_label (PAGE_PTR pgptr)
|
| void |
pgbuf_get_vpid (PAGE_PTR pgptr, VPID * vpid)
|
| VPID * |
pgbuf_get_vpid_ptr (PAGE_PTR pgptr)
|
| bool |
pgbuf_has_any_non_vacuum_waiters (PAGE_PTR pgptr)
|
| bool |
pgbuf_has_any_waiters (PAGE_PTR pgptr)
|
| bool |
pgbuf_has_perm_pages_fixed (THREAD_ENTRY * thread_p)
|
| bool |
pgbuf_has_prevent_dealloc (PAGE_PTR pgptr)
|
| unsigned int |
pgbuf_hash_vpid (const void * key_vpid, unsigned int htsize)
|
| int |
pgbuf_initialize (void)
|
| int |
pgbuf_invalidate_all_debug (THREAD_ENTRY * thread_p, VOLID volid, const char * caller_file, int caller_line)
|
| int |
pgbuf_invalidate_debug (THREAD_ENTRY * thread_p, PAGE_PTR pgptr, const char * caller_file, int caller_line)
|
| bool |
pgbuf_is_io_stressful (void)
|
| bool |
pgbuf_is_log_check_for_interrupts (THREAD_ENTRY * thread_p)
|
| bool |
pgbuf_is_lsa_temporary (PAGE_PTR pgptr)
|
| bool |
pgbuf_is_page_fixed_by_thread (THREAD_ENTRY * thread_p, const VPID * vpid_p)
|
| DISK_ISVALID |
pgbuf_is_valid_page (THREAD_ENTRY * thread_p, const VPID * vpid, bool no_error)
|
| bool |
pgbuf_keep_victim_flush_thread_running (void)
|
| void |
pgbuf_log_new_page (THREAD_ENTRY * thread_p, PAGE_PTR page_new, int data_size, PAGE_TYPE ptype_new)
|
| void |
pgbuf_log_redo_new_page (THREAD_ENTRY * thread_p, PAGE_PTR page_new, int data_size, PAGE_TYPE ptype_new)
|
| void |
pgbuf_notify_vacuum_follows (THREAD_ENTRY * thread_p, PAGE_PTR page)
|
| int |
pgbuf_ordered_fix_debug (THREAD_ENTRY * thread_p, const VPID * req_vpid, PAGE_FETCH_MODE fetch_mode, const PGBUF_LATCH_MODE requestmode, PGBUF_WATCHER * req_watcher, const char * caller_file, int caller_line, const char * caller_func)
|
| void |
pgbuf_ordered_set_dirty_and_free (THREAD_ENTRY * thread_p, PGBUF_WATCHER * pg_watcher)
|
| void |
pgbuf_ordered_unfix_debug (THREAD_ENTRY * thread_p, PGBUF_WATCHER * watcher_object, const char * caller_file, int caller_line, const char * caller_func)
|
| void |
pgbuf_peek_stats (UINT64 * fixed_cnt, UINT64 * dirty_cnt, UINT64 * lru1_cnt, UINT64 * lru2_cnt, UINT64 * lru3_cnt, UINT64 * vict_candidates, UINT64 * avoid_dealloc_cnt, UINT64 * avoid_victim_cnt, UINT64 * private_quota, UINT64 * private_cnt, UINT64 * alloc_bcb_waiter_high, UINT64 * alloc_bcb_waiter_med, UINT64 * alloc_bcb_waiter_low, UINT64 * lfcq_big_prv_num, UINT64 * lfcq_prv_num, UINT64 * lfcq_shr_num)
|
| int |
pgbuf_promote_read_latch_debug (THREAD_ENTRY * thread_p, PAGE_PTR * pgptr_p, PGBUF_PROMOTE_CONDITION condition, const char * caller_file, int caller_line, const char * caller_func)
|
| int |
pgbuf_release_private_lru (THREAD_ENTRY * thread_p, const int private_idx)
|
| void |
pgbuf_replace_watcher_debug (THREAD_ENTRY * thread_p, PGBUF_WATCHER * old_watcher, PGBUF_WATCHER * new_watcher, const char * caller_file, const int caller_line)
|
| void |
pgbuf_reset_temp_lsa (PAGE_PTR pgptr)
|
| int |
pgbuf_rv_dealloc_redo (THREAD_ENTRY * thread_p, LOG_RCV * rcv)
|
| int |
pgbuf_rv_dealloc_undo (THREAD_ENTRY * thread_p, LOG_RCV * rcv)
|
| int |
pgbuf_rv_dealloc_undo_compensate (THREAD_ENTRY * thread_p, LOG_RCV * rcv)
|
| int |
pgbuf_rv_flush_page (THREAD_ENTRY * thread_p, LOG_RCV * rcv)
|
| void |
pgbuf_rv_flush_page_dump (FILE * fp, int length, void * data)
|
| int |
pgbuf_rv_new_page_redo (THREAD_ENTRY * thread_p, LOG_RCV * rcv)
|
| int |
pgbuf_rv_new_page_undo (THREAD_ENTRY * thread_p, LOG_RCV * rcv)
|
| int |
pgbuf_rv_set_tde_algorithm (THREAD_ENTRY * thread_p, LOG_RCV * rcv)
|
| void |
pgbuf_set_dirty_debug (THREAD_ENTRY * thread_p, PAGE_PTR pgptr, bool free_page, const char * caller_file, int caller_line, const char * caller_func)
|
| void |
pgbuf_set_lsa_as_temporary (THREAD_ENTRY * thread_p, PAGE_PTR pgptr)
|
| const LOG_LSA * |
pgbuf_set_lsa_debug (THREAD_ENTRY * thread_p, PAGE_PTR pgptr, const LOG_LSA * lsa_ptr, const char * caller_file, int caller_line, const char * caller_func)
|
| void |
pgbuf_set_page_ptype (THREAD_ENTRY * thread_p, PAGE_PTR pgptr, PAGE_TYPE ptype)
|
| void |
pgbuf_set_tde_algorithm (THREAD_ENTRY * thread_p, PAGE_PTR pgptr, TDE_ALGORITHM tde_algo, bool skip_logging)
|
| PAGE_PTR |
pgbuf_simple_fix (THREAD_ENTRY * thread_p, const VPID * vpid, bool need_fix)
|
| void |
pgbuf_simple_unfix (THREAD_ENTRY * thread_p, PAGE_PTR pgptr)
|
| int |
pgbuf_start_scan (THREAD_ENTRY * thread_p, int type, DB_VALUE ** arg_values, int arg_cnt, void ** ptr)
|
| void |
pgbuf_thread_variables_init (THREAD_ENTRY * thread_p)
|
| void |
pgbuf_unfix_all (THREAD_ENTRY * thread_p)
|
| void |
pgbuf_unfix_debug (THREAD_ENTRY * thread_p, PAGE_PTR pgptr, const char * caller_file, int caller_line, const char * caller_func)
|
| void |
pgbuf_watcher_init_debug (PGBUF_WATCHER * watcher, const char * caller_file, const int caller_line, bool add)
|
Macros
| Type |
Name |
| define |
DONT_FREE [**false**](broker__monitor_8c.md#function-timeout) /\* [**Don**](broker__monitor_8c.md#function-timeout)'[**t**](broker__monitor_8c.md#function-timeout) [**free**](memory__cwrapper_8h.md#define-free) [**the**](broker__monitor_8c.md#function-timeout) page buffer \*/
|
| define |
FREE [**true**](broker__monitor_8c.md#function-timeout) /\* Free page buffer \*/
|
| define |
PGBUF_CLEAR_WATCHER (w) /* multi line expression */
|
| define |
PGBUF_INIT_WATCHER (w, rank, hfid) /* multi line expression */
|
| define |
PGBUF_IS_CLEAN_WATCHER (w) /* multi line expression */
|
| define |
PGBUF_IS_ORDERED_PAGETYPE (ptype) ((ptype) == PAGE\_HEAP \|\| (ptype) == PAGE\_OVERFLOW)
|
| define |
PGBUF_IS_PAGE_CHANGED (pgptr, ref_lsa) ( ((ref\_lsa), [**pgbuf\_get\_lsa**](page__buffer_8c.md#function-pgbuf_get_lsa) ((pgptr))))
|
| define |
PGBUF_ORDERED_NULL_HFID ([**pgbuf\_ordered\_null\_hfid**](page__buffer_8c.md#variable-pgbuf_ordered_null_hfid))
|
| define |
PGBUF_PAGE_LSA_AS_ARGS (pg) ([**long**](broker__monitor_8c.md#function-timeout) [**long**](broker__monitor_8c.md#function-timeout) [**int**](broker__monitor_8c.md#function-timeout)) [**pgbuf\_get\_lsa**](page__buffer_8c.md#function-pgbuf_get_lsa) ([**pg**](broker__monitor_8c.md#function-timeout))->pageid, ([**int**](broker__monitor_8c.md#function-timeout)) [**pgbuf\_get\_lsa**](page__buffer_8c.md#function-pgbuf_get_lsa) ([**pg**](broker__monitor_8c.md#function-timeout))->offset
|
| define |
PGBUF_PAGE_MODIFY_ARGS (pg, prev_lsa) [**PGBUF\_PAGE\_VPID\_AS\_ARGS**](page__buffer_8h.md#define-pgbuf_page_vpid_as_args) ([**pg**](broker__monitor_8c.md#function-timeout)), [**LSA\_AS\_ARGS**](log__lsa_8hpp.md#define-lsa_as_args) (prev\_lsa), [**PGBUF\_PAGE\_LSA\_AS\_ARGS**](page__buffer_8h.md#define-pgbuf_page_lsa_as_args) ([**pg**](broker__monitor_8c.md#function-timeout))
|
| define |
PGBUF_PAGE_MODIFY_MSG (name) name " { VPID = %d\|%d, prev\_lsa = %[**lld**](broker__monitor_8c.md#function-timeout)\|%d, [**crt\_lsa**](broker__monitor_8c.md#function-timeout) = %[**lld**](broker__monitor_8c.md#function-timeout)\|%d } "
|
| define |
PGBUF_PAGE_STATE_ARGS (pg) [**PGBUF\_PAGE\_VPID\_AS\_ARGS**](page__buffer_8h.md#define-pgbuf_page_vpid_as_args) ([**pg**](broker__monitor_8c.md#function-timeout)), [**PGBUF\_PAGE\_LSA\_AS\_ARGS**](page__buffer_8h.md#define-pgbuf_page_lsa_as_args) ([**pg**](broker__monitor_8c.md#function-timeout))
|
| define |
PGBUF_PAGE_STATE_MSG (name) name " { VPID = %d\|%d, [**crt\_lsa**](broker__monitor_8c.md#function-timeout) = %[**lld**](broker__monitor_8c.md#function-timeout)\|%d } "
|
| define |
PGBUF_PAGE_VPID_AS_ARGS (pg) [**pgbuf\_get\_volume\_id**](page__buffer_8c.md#function-pgbuf_get_volume_id) ([**pg**](broker__monitor_8c.md#function-timeout)), [**pgbuf\_get\_page\_id**](page__buffer_8c.md#function-pgbuf_get_page_id) ([**pg**](broker__monitor_8c.md#function-timeout))
|
| define |
PGBUF_WATCHER_COPY_GROUP (w_dst, w_src) /* multi line expression */
|
| define |
PGBUF_WATCHER_MAGIC_NUMBER 0x12345678
|
| define |
PGBUF_WATCHER_RESET_RANK (w, rank) /* multi line expression */
|
| define |
PGBUF_WATCHER_SET_GROUP (w, hfid) /* multi line expression */
|
| define |
VPID_EQ_FOR_OIDS (oid_ptr1, oid_ptr2) /* multi line expression */
|
| define |
VPID_GET_FROM_OID (vpid_ptr, oid_ptr) [**VPID\_SET**](dbtype__def_8h.md#define-vpid_set) ([**vpid\_ptr**](broker__monitor_8c.md#function-timeout), (oid\_ptr)->volid, (oid\_ptr)->pageid);
|
| define |
pgbuf_attach_watcher (...) [**pgbuf\_attach\_watcher\_debug**](page__buffer_8c.md#function-pgbuf_attach_watcher_debug) ([**\_\_VA\_ARGS\_\_**](broker__monitor_8c.md#function-timeout), [**ARG\_FILE\_LINE**](error__manager_8h.md#define-arg_file_line))
|
| define |
pgbuf_fix (thread_p, vpid, fetch_mode, requestmode, condition) [**pgbuf\_fix\_debug**](page__buffer_8c.md#function-pgbuf_fix_debug)(thread\_p, [**vpid**](structvpid.md), fetch\_mode, [**requestmode**](broker__monitor_8c.md#function-timeout), condition, [**ARG\_FILE\_LINE\_FUNC**](error__manager_8h.md#define-arg_file_line_func))
|
| define |
pgbuf_fix_if_not_deallocated (thread_p, vpid, latch_mode, latch_condition, page) [**pgbuf\_fix\_if\_not\_deallocated\_with\_caller**](page__buffer_8c.md#function-pgbuf_fix_if_not_deallocated_with_caller) (thread\_p, [**vpid**](structvpid.md), latch\_mode, [**latch\_condition**](broker__monitor_8c.md#function-timeout), page, [**ARG\_FILE\_LINE\_FUNC**](error__manager_8h.md#define-arg_file_line_func))
|
| define |
pgbuf_invalidate (thread_p, pgptr) [**pgbuf\_invalidate\_debug**](page__buffer_8c.md#function-pgbuf_invalidate_debug)(thread\_p, pgptr, [**\_\_FILE\_\_**](broker__monitor_8c.md#function-timeout), [**\_\_LINE\_\_**](broker__monitor_8c.md#function-timeout))
|
| define |
pgbuf_invalidate_all (thread_p, volid) [**pgbuf\_invalidate\_all\_debug**](page__buffer_8c.md#function-pgbuf_invalidate_all_debug)(thread\_p, volid, [**\_\_FILE\_\_**](broker__monitor_8c.md#function-timeout), [**\_\_LINE\_\_**](broker__monitor_8c.md#function-timeout))
|
| define |
pgbuf_ordered_fix (thread_p, req_vpid, fetch_mode, requestmode, req_watcher) [**pgbuf\_ordered\_fix\_debug**](page__buffer_8c.md#function-pgbuf_ordered_fix_debug)(thread\_p, [**req\_vpid**](broker__monitor_8c.md#function-timeout), fetch\_mode, [**requestmode**](broker__monitor_8c.md#function-timeout), [**req\_watcher**](broker__monitor_8c.md#function-timeout), [**ARG\_FILE\_LINE\_FUNC**](error__manager_8h.md#define-arg_file_line_func))
|
| define |
pgbuf_ordered_unfix (thread_p, watcher_object) [**pgbuf\_ordered\_unfix\_debug**](page__buffer_8c.md#function-pgbuf_ordered_unfix_debug)(thread\_p, [**watcher\_object**](broker__monitor_8c.md#function-timeout), [**ARG\_FILE\_LINE\_FUNC**](error__manager_8h.md#define-arg_file_line_func))
|
| define |
pgbuf_ordered_unfix_and_init (thread_p, page, pg_watcher) /* multi line expression */
|
| define |
pgbuf_promote_read_latch (thread_p, pgptr_p, condition) [**pgbuf\_promote\_read\_latch\_debug**](page__buffer_8c.md#function-pgbuf_promote_read_latch_debug)(thread\_p, [**pgptr\_p**](broker__monitor_8c.md#function-timeout), condition, [**ARG\_FILE\_LINE\_FUNC**](error__manager_8h.md#define-arg_file_line_func))
|
| define |
pgbuf_replace_watcher (thread_p, old_watcher, new_watcher) /* multi line expression */
|
| define |
pgbuf_set_dirty (...) [**pgbuf\_set\_dirty\_debug**](page__buffer_8c.md#function-pgbuf_set_dirty_debug)([**\_\_VA\_ARGS\_\_**](broker__monitor_8c.md#function-timeout), [**ARG\_FILE\_LINE\_FUNC**](error__manager_8h.md#define-arg_file_line_func))
|
| define |
pgbuf_set_dirty_and_free (thread_p, pgptr) [**pgbuf\_set\_dirty**](page__buffer_8h.md#define-pgbuf_set_dirty) (thread\_p, pgptr, [**FREE**](cas__common_8h.md#define-free)); pgptr = [**NULL**](freelistheap_8h.md#define-null)
|
| define |
pgbuf_set_lsa (...) [**pgbuf\_set\_lsa\_debug**](page__buffer_8c.md#function-pgbuf_set_lsa_debug)([**\_\_VA\_ARGS\_\_**](broker__monitor_8c.md#function-timeout), [**ARG\_FILE\_LINE\_FUNC**](error__manager_8h.md#define-arg_file_line_func))
|
| define |
pgbuf_unfix (thread_p, pgptr) [**pgbuf\_unfix\_debug**](page__buffer_8c.md#function-pgbuf_unfix_debug)(thread\_p, pgptr, [**ARG\_FILE\_LINE\_FUNC**](error__manager_8h.md#define-arg_file_line_func))
|
| define |
pgbuf_unfix_and_init (thread_p, pgptr) /* multi line expression */
|
| define |
pgbuf_unfix_and_init_after_check (thread_p, pgptr) /* multi line expression */
|
Public Types Documentation
enum PAGE_FETCH_MODE
enum PAGE_FETCH_MODE {
OLD_PAGE = 0,
NEW_PAGE,
OLD_PAGE_IF_IN_BUFFER,
OLD_PAGE_PREVENT_DEALLOC,
OLD_PAGE_DEALLOCATED,
OLD_PAGE_MAYBE_DEALLOCATED,
RECOVERY_PAGE
};
enum PGBUF_DEBUG_PAGE_VALIDATION_LEVEL
enum PGBUF_DEBUG_PAGE_VALIDATION_LEVEL {
PGBUF_DEBUG_NO_PAGE_VALIDATION,
PGBUF_DEBUG_PAGE_VALIDATION_FETCH,
PGBUF_DEBUG_PAGE_VALIDATION_FREE,
PGBUF_DEBUG_PAGE_VALIDATION_ALL
};
enum PGBUF_LATCH_CONDITION
enum PGBUF_LATCH_CONDITION {
PGBUF_UNCONDITIONAL_LATCH,
PGBUF_CONDITIONAL_LATCH
};
typedef PGBUF_ORDERED_GROUP
typedef VPID PGBUF_ORDERED_GROUP;
enum PGBUF_ORDERED_RANK
enum PGBUF_ORDERED_RANK {
PGBUF_ORDERED_HEAP_HDR = 0,
PGBUF_ORDERED_HEAP_NORMAL,
PGBUF_ORDERED_HEAP_OVERFLOW,
PGBUF_ORDERED_RANK_UNDEFINED
};
enum PGBUF_PROMOTE_CONDITION {
PGBUF_PROMOTE_ONLY_READER,
PGBUF_PROMOTE_SHARED_READER
};
typedef PGBUF_WATCHER
typedef struct pgbuf_watcher PGBUF_WATCHER;
typedef pgbuf_aligned_buffer
using pgbuf_aligned_buffer = cubmem::stack_block<(size_t) (16 * ONE_K) >;
typedef pgbuf_resizable_buffer
using pgbuf_resizable_buffer = cubmem::extensible_stack_block<(size_t) (16 * ONE_K) >;
Public Attributes Documentation
variable PGBUF_LATCH_FLUSH
typedef PGBUF_LATCH_FLUSH;
variable PGBUF_LATCH_INVALID
typedef PGBUF_LATCH_INVALID;
variable PGBUF_LATCH_READ
typedef PGBUF_LATCH_READ;
variable PGBUF_LATCH_WRITE
typedef PGBUF_LATCH_WRITE;
variable PGBUF_TEMP_LSA
const log_lsa PGBUF_TEMP_LSA;
variable enum
variable pgbuf_ordered_null_hfid
HFID* pgbuf_ordered_null_hfid;
variable vpid_Null_vpid
const VPID vpid_Null_vpid;
Public Functions Documentation
function pgbuf_adjust_quotas
void pgbuf_adjust_quotas (
THREAD_ENTRY * thread_p
)
function pgbuf_assign_flushed_pages
bool pgbuf_assign_flushed_pages (
THREAD_ENTRY * thread_p
)
function pgbuf_assign_private_lru
int pgbuf_assign_private_lru (
THREAD_ENTRY * thread_p
)
function pgbuf_attach_watcher_debug
void pgbuf_attach_watcher_debug (
THREAD_ENTRY * thread_p,
PAGE_PTR pgptr,
PGBUF_LATCH_MODE latch_mode,
HFID * hfid,
PGBUF_WATCHER * watcher,
const char * file,
const int line
)
function pgbuf_check_page_ptype
bool pgbuf_check_page_ptype (
THREAD_ENTRY * thread_p,
PAGE_PTR pgptr,
PAGE_TYPE ptype
)
function pgbuf_check_page_type_no_error
bool pgbuf_check_page_type_no_error (
THREAD_ENTRY * thread_p,
PAGE_PTR pgptr,
PAGE_TYPE ptype
)
function pgbuf_compare_vpid
int pgbuf_compare_vpid (
const void * key_vpid1,
const void * key_vpid2
)
function pgbuf_copy_from_area
void * pgbuf_copy_from_area (
THREAD_ENTRY * thread_p,
const VPID * vpid,
int start_offset,
int length,
void * area,
bool do_fetch,
TDE_ALGORITHM tde_algo
)
function pgbuf_copy_to_area
void * pgbuf_copy_to_area (
THREAD_ENTRY * thread_p,
const VPID * vpid,
int start_offset,
int length,
void * area,
bool do_fetch
)
function pgbuf_daemons_destroy
void pgbuf_daemons_destroy ()
function pgbuf_daemons_get_stats
void pgbuf_daemons_get_stats (
UINT64 * stats_out
)
function pgbuf_daemons_init
void pgbuf_daemons_init ()
function pgbuf_dealloc_page
void pgbuf_dealloc_page (
THREAD_ENTRY * thread_p,
PAGE_PTR page_dealloc
)
function pgbuf_dealloc_temp_page
int pgbuf_dealloc_temp_page (
THREAD_ENTRY * thread_p,
PAGE_PTR pgptr,
bool need_free
)
function pgbuf_direct_victims_maintenance
void pgbuf_direct_victims_maintenance (
THREAD_ENTRY * thread_p
)
function pgbuf_dump_if_any_fixed
void pgbuf_dump_if_any_fixed (
void
)
function pgbuf_finalize
void pgbuf_finalize (
void
)
function pgbuf_fix_debug
PAGE_PTR pgbuf_fix_debug (
THREAD_ENTRY * thread_p,
const VPID * vpid,
PAGE_FETCH_MODE fetch_mode,
PGBUF_LATCH_MODE requestmode,
PGBUF_LATCH_CONDITION condition,
const char * caller_file,
int caller_line,
const char * caller_func
)
function pgbuf_fix_if_not_deallocated_with_caller
int pgbuf_fix_if_not_deallocated_with_caller (
THREAD_ENTRY * thead_p,
const VPID * vpid,
PGBUF_LATCH_MODE latch_mode,
PGBUF_LATCH_CONDITION latch_condition,
PAGE_PTR * page,
const char * caller_file,
int caller_line,
const char * caller_func
)
function pgbuf_fix_with_retry
PAGE_PTR pgbuf_fix_with_retry (
THREAD_ENTRY * thread_p,
const VPID * vpid,
PAGE_FETCH_MODE fetch_mode,
PGBUF_LATCH_MODE request_mode,
int retry
)
function pgbuf_flush
void pgbuf_flush (
THREAD_ENTRY * thread_p,
PAGE_PTR pgptr,
bool free_page
)
function pgbuf_flush_all
int pgbuf_flush_all (
THREAD_ENTRY * thread_p,
VOLID volid
)
function pgbuf_flush_all_unfixed
int pgbuf_flush_all_unfixed (
THREAD_ENTRY * thread_p,
VOLID volid
)
function pgbuf_flush_all_unfixed_and_set_lsa_as_null
int pgbuf_flush_all_unfixed_and_set_lsa_as_null (
THREAD_ENTRY * thread_p,
VOLID volid
)
function pgbuf_flush_checkpoint
int pgbuf_flush_checkpoint (
THREAD_ENTRY * thread_p,
const LOG_LSA * flush_upto_lsa,
const LOG_LSA * prev_chkpt_redo_lsa,
LOG_LSA * smallest_lsa,
int * flushed_page_cnt
)
function pgbuf_flush_control_from_dirty_ratio
int pgbuf_flush_control_from_dirty_ratio (
void
)
function pgbuf_flush_if_requested
void pgbuf_flush_if_requested (
THREAD_ENTRY * thread_p,
PAGE_PTR page
)
function pgbuf_flush_victim_candidates
int pgbuf_flush_victim_candidates (
THREAD_ENTRY * thread_p,
float flush_ratio,
PERF_UTIME_TRACKER * time_tracker,
bool * stop
)
function pgbuf_flush_with_wal
PAGE_PTR pgbuf_flush_with_wal (
THREAD_ENTRY * thread_p,
PAGE_PTR pgptr
)
function pgbuf_force_to_check_for_interrupts
void pgbuf_force_to_check_for_interrupts (
void
)
function pgbuf_get_condition_for_ordered_fix
int pgbuf_get_condition_for_ordered_fix (
const VPID * vpid_new_page,
const VPID * vpid_fixed_page,
const HFID * hfid
)
function pgbuf_get_fix_count
int pgbuf_get_fix_count (
PAGE_PTR pgptr
)
function pgbuf_get_hold_count
int pgbuf_get_hold_count (
THREAD_ENTRY * thread_p
)
function pgbuf_get_latch_mode
PGBUF_LATCH_MODE pgbuf_get_latch_mode (
PAGE_PTR pgptr
)
function pgbuf_get_lsa
LOG_LSA * pgbuf_get_lsa (
PAGE_PTR pgptr
)
function pgbuf_get_page_id
PAGEID pgbuf_get_page_id (
PAGE_PTR pgptr
)
function pgbuf_get_page_ptype
PAGE_TYPE pgbuf_get_page_ptype (
THREAD_ENTRY * thread_p,
PAGE_PTR pgptr
)
function pgbuf_get_page_type_for_stat
PERF_PAGE_TYPE pgbuf_get_page_type_for_stat (
THREAD_ENTRY * thread_p,
PAGE_PTR pgptr
)
function pgbuf_get_tde_algorithm
TDE_ALGORITHM pgbuf_get_tde_algorithm (
PAGE_PTR pgptr
)
function pgbuf_get_volume_id
VOLID pgbuf_get_volume_id (
PAGE_PTR pgptr
)
function pgbuf_get_volume_label
const char * pgbuf_get_volume_label (
PAGE_PTR pgptr
)
function pgbuf_get_vpid
void pgbuf_get_vpid (
PAGE_PTR pgptr,
VPID * vpid
)
function pgbuf_get_vpid_ptr
VPID * pgbuf_get_vpid_ptr (
PAGE_PTR pgptr
)
function pgbuf_has_any_non_vacuum_waiters
bool pgbuf_has_any_non_vacuum_waiters (
PAGE_PTR pgptr
)
function pgbuf_has_any_waiters
bool pgbuf_has_any_waiters (
PAGE_PTR pgptr
)
function pgbuf_has_perm_pages_fixed
bool pgbuf_has_perm_pages_fixed (
THREAD_ENTRY * thread_p
)
function pgbuf_has_prevent_dealloc
bool pgbuf_has_prevent_dealloc (
PAGE_PTR pgptr
)
function pgbuf_hash_vpid
unsigned int pgbuf_hash_vpid (
const void * key_vpid,
unsigned int htsize
)
function pgbuf_initialize
int pgbuf_initialize (
void
)
function pgbuf_invalidate_all_debug
int pgbuf_invalidate_all_debug (
THREAD_ENTRY * thread_p,
VOLID volid,
const char * caller_file,
int caller_line
)
function pgbuf_invalidate_debug
int pgbuf_invalidate_debug (
THREAD_ENTRY * thread_p,
PAGE_PTR pgptr,
const char * caller_file,
int caller_line
)
function pgbuf_is_io_stressful
bool pgbuf_is_io_stressful (
void
)
function pgbuf_is_log_check_for_interrupts
bool pgbuf_is_log_check_for_interrupts (
THREAD_ENTRY * thread_p
)
function pgbuf_is_lsa_temporary
bool pgbuf_is_lsa_temporary (
PAGE_PTR pgptr
)
function pgbuf_is_page_fixed_by_thread
bool pgbuf_is_page_fixed_by_thread (
THREAD_ENTRY * thread_p,
const VPID * vpid_p
)
function pgbuf_is_valid_page
DISK_ISVALID pgbuf_is_valid_page (
THREAD_ENTRY * thread_p,
const VPID * vpid,
bool no_error
)
function pgbuf_keep_victim_flush_thread_running
bool pgbuf_keep_victim_flush_thread_running (
void
)
function pgbuf_log_new_page
void pgbuf_log_new_page (
THREAD_ENTRY * thread_p,
PAGE_PTR page_new,
int data_size,
PAGE_TYPE ptype_new
)
function pgbuf_log_redo_new_page
void pgbuf_log_redo_new_page (
THREAD_ENTRY * thread_p,
PAGE_PTR page_new,
int data_size,
PAGE_TYPE ptype_new
)
function pgbuf_notify_vacuum_follows
void pgbuf_notify_vacuum_follows (
THREAD_ENTRY * thread_p,
PAGE_PTR page
)
function pgbuf_ordered_fix_debug
int pgbuf_ordered_fix_debug (
THREAD_ENTRY * thread_p,
const VPID * req_vpid,
PAGE_FETCH_MODE fetch_mode,
const PGBUF_LATCH_MODE requestmode,
PGBUF_WATCHER * req_watcher,
const char * caller_file,
int caller_line,
const char * caller_func
)
function pgbuf_ordered_set_dirty_and_free
void pgbuf_ordered_set_dirty_and_free (
THREAD_ENTRY * thread_p,
PGBUF_WATCHER * pg_watcher
)
function pgbuf_ordered_unfix_debug
void pgbuf_ordered_unfix_debug (
THREAD_ENTRY * thread_p,
PGBUF_WATCHER * watcher_object,
const char * caller_file,
int caller_line,
const char * caller_func
)
function pgbuf_peek_stats
void pgbuf_peek_stats (
UINT64 * fixed_cnt,
UINT64 * dirty_cnt,
UINT64 * lru1_cnt,
UINT64 * lru2_cnt,
UINT64 * lru3_cnt,
UINT64 * vict_candidates,
UINT64 * avoid_dealloc_cnt,
UINT64 * avoid_victim_cnt,
UINT64 * private_quota,
UINT64 * private_cnt,
UINT64 * alloc_bcb_waiter_high,
UINT64 * alloc_bcb_waiter_med,
UINT64 * alloc_bcb_waiter_low,
UINT64 * lfcq_big_prv_num,
UINT64 * lfcq_prv_num,
UINT64 * lfcq_shr_num
)
int pgbuf_promote_read_latch_debug (
THREAD_ENTRY * thread_p,
PAGE_PTR * pgptr_p,
PGBUF_PROMOTE_CONDITION condition,
const char * caller_file,
int caller_line,
const char * caller_func
)
function pgbuf_release_private_lru
int pgbuf_release_private_lru (
THREAD_ENTRY * thread_p,
const int private_idx
)
function pgbuf_replace_watcher_debug
void pgbuf_replace_watcher_debug (
THREAD_ENTRY * thread_p,
PGBUF_WATCHER * old_watcher,
PGBUF_WATCHER * new_watcher,
const char * caller_file,
const int caller_line
)
function pgbuf_reset_temp_lsa
void pgbuf_reset_temp_lsa (
PAGE_PTR pgptr
)
function pgbuf_rv_dealloc_redo
int pgbuf_rv_dealloc_redo (
THREAD_ENTRY * thread_p,
LOG_RCV * rcv
)
function pgbuf_rv_dealloc_undo
int pgbuf_rv_dealloc_undo (
THREAD_ENTRY * thread_p,
LOG_RCV * rcv
)
function pgbuf_rv_dealloc_undo_compensate
int pgbuf_rv_dealloc_undo_compensate (
THREAD_ENTRY * thread_p,
LOG_RCV * rcv
)
function pgbuf_rv_flush_page
int pgbuf_rv_flush_page (
THREAD_ENTRY * thread_p,
LOG_RCV * rcv
)
function pgbuf_rv_flush_page_dump
void pgbuf_rv_flush_page_dump (
FILE * fp,
int length,
void * data
)
function pgbuf_rv_new_page_redo
int pgbuf_rv_new_page_redo (
THREAD_ENTRY * thread_p,
LOG_RCV * rcv
)
function pgbuf_rv_new_page_undo
int pgbuf_rv_new_page_undo (
THREAD_ENTRY * thread_p,
LOG_RCV * rcv
)
function pgbuf_rv_set_tde_algorithm
int pgbuf_rv_set_tde_algorithm (
THREAD_ENTRY * thread_p,
LOG_RCV * rcv
)
function pgbuf_set_dirty_debug
void pgbuf_set_dirty_debug (
THREAD_ENTRY * thread_p,
PAGE_PTR pgptr,
bool free_page,
const char * caller_file,
int caller_line,
const char * caller_func
)
function pgbuf_set_lsa_as_temporary
void pgbuf_set_lsa_as_temporary (
THREAD_ENTRY * thread_p,
PAGE_PTR pgptr
)
function pgbuf_set_lsa_debug
const LOG_LSA * pgbuf_set_lsa_debug (
THREAD_ENTRY * thread_p,
PAGE_PTR pgptr,
const LOG_LSA * lsa_ptr,
const char * caller_file,
int caller_line,
const char * caller_func
)
function pgbuf_set_page_ptype
void pgbuf_set_page_ptype (
THREAD_ENTRY * thread_p,
PAGE_PTR pgptr,
PAGE_TYPE ptype
)
function pgbuf_set_tde_algorithm
void pgbuf_set_tde_algorithm (
THREAD_ENTRY * thread_p,
PAGE_PTR pgptr,
TDE_ALGORITHM tde_algo,
bool skip_logging
)
function pgbuf_simple_fix
PAGE_PTR pgbuf_simple_fix (
THREAD_ENTRY * thread_p,
const VPID * vpid,
bool need_fix
)
function pgbuf_simple_unfix
void pgbuf_simple_unfix (
THREAD_ENTRY * thread_p,
PAGE_PTR pgptr
)
function pgbuf_start_scan
int pgbuf_start_scan (
THREAD_ENTRY * thread_p,
int type,
DB_VALUE ** arg_values,
int arg_cnt,
void ** ptr
)
function pgbuf_thread_variables_init
void pgbuf_thread_variables_init (
THREAD_ENTRY * thread_p
)
function pgbuf_unfix_all
void pgbuf_unfix_all (
THREAD_ENTRY * thread_p
)
function pgbuf_unfix_debug
void pgbuf_unfix_debug (
THREAD_ENTRY * thread_p,
PAGE_PTR pgptr,
const char * caller_file,
int caller_line,
const char * caller_func
)
function pgbuf_watcher_init_debug
void pgbuf_watcher_init_debug (
PGBUF_WATCHER * watcher,
const char * caller_file,
const int caller_line,
bool add
)
Macro Definition Documentation
define DONT_FREE
#define DONT_FREE `false /* Don ' t free the page buffer */`
define FREE
#define FREE `true /* Free page buffer */`
define PGBUF_CLEAR_WATCHER
#define PGBUF_CLEAR_WATCHER (
w
) `/* multi line expression */`
define PGBUF_INIT_WATCHER
#define PGBUF_INIT_WATCHER (
w,
rank,
hfid
) `/* multi line expression */`
define PGBUF_IS_CLEAN_WATCHER
#define PGBUF_IS_CLEAN_WATCHER (
w
) `/* multi line expression */`
define PGBUF_IS_ORDERED_PAGETYPE
#define PGBUF_IS_ORDERED_PAGETYPE (
ptype
) `((ptype) == PAGE_HEAP || (ptype) == PAGE_OVERFLOW )`
define PGBUF_IS_PAGE_CHANGED
#define PGBUF_IS_PAGE_CHANGED (
pgptr,
ref_lsa
) `(! LSA_EQ ((ref_lsa), pgbuf_get_lsa ((pgptr))))`
define PGBUF_ORDERED_NULL_HFID
#define PGBUF_ORDERED_NULL_HFID `( pgbuf_ordered_null_hfid )`
define PGBUF_PAGE_LSA_AS_ARGS
#define PGBUF_PAGE_LSA_AS_ARGS (
pg
) `( long long int ) pgbuf_get_lsa ( pg )->pageid, ( int ) pgbuf_get_lsa ( pg )->offset`
define PGBUF_PAGE_MODIFY_ARGS
#define PGBUF_PAGE_MODIFY_ARGS (
pg,
prev_lsa
) `PGBUF_PAGE_VPID_AS_ARGS ( pg ), LSA_AS_ARGS (prev_lsa), PGBUF_PAGE_LSA_AS_ARGS ( pg )`
define PGBUF_PAGE_MODIFY_MSG
#define PGBUF_PAGE_MODIFY_MSG (
name
) `name " { VPID = %d|%d, prev_lsa = % lld |%d, crt_lsa = % lld |%d } "`
define PGBUF_PAGE_STATE_ARGS
#define PGBUF_PAGE_STATE_ARGS (
pg
) `PGBUF_PAGE_VPID_AS_ARGS ( pg ), PGBUF_PAGE_LSA_AS_ARGS ( pg )`
define PGBUF_PAGE_STATE_MSG
#define PGBUF_PAGE_STATE_MSG (
name
) `name " { VPID = %d|%d, crt_lsa = % lld |%d } "`
define PGBUF_PAGE_VPID_AS_ARGS
#define PGBUF_PAGE_VPID_AS_ARGS (
pg
) `pgbuf_get_volume_id ( pg ), pgbuf_get_page_id ( pg )`
define PGBUF_WATCHER_COPY_GROUP
#define PGBUF_WATCHER_COPY_GROUP (
w_dst,
w_src
) `/* multi line expression */`
define PGBUF_WATCHER_MAGIC_NUMBER
#define PGBUF_WATCHER_MAGIC_NUMBER `0x12345678`
define PGBUF_WATCHER_RESET_RANK
#define PGBUF_WATCHER_RESET_RANK (
w,
rank
) `/* multi line expression */`
define PGBUF_WATCHER_SET_GROUP
#define PGBUF_WATCHER_SET_GROUP (
w,
hfid
) `/* multi line expression */`
define VPID_EQ_FOR_OIDS
#define VPID_EQ_FOR_OIDS (
oid_ptr1,
oid_ptr2
) `/* multi line expression */`
define VPID_GET_FROM_OID
#define VPID_GET_FROM_OID (
vpid_ptr,
oid_ptr
) `VPID_SET ( vpid_ptr , (oid_ptr)->volid, (oid_ptr)->pageid);`
define pgbuf_attach_watcher
#define pgbuf_attach_watcher (
...
) `pgbuf_attach_watcher_debug ( __VA_ARGS__ , ARG_FILE_LINE )`
define pgbuf_fix
#define pgbuf_fix (
thread_p,
vpid,
fetch_mode,
requestmode,
condition
) `pgbuf_fix_debug (thread_p, vpid , fetch_mode, requestmode , condition, ARG_FILE_LINE_FUNC )`
define pgbuf_fix_if_not_deallocated
#define pgbuf_fix_if_not_deallocated (
thread_p,
vpid,
latch_mode,
latch_condition,
page
) `pgbuf_fix_if_not_deallocated_with_caller (thread_p, vpid , latch_mode, latch_condition , page, ARG_FILE_LINE_FUNC )`
define pgbuf_invalidate
#define pgbuf_invalidate (
thread_p,
pgptr
) `pgbuf_invalidate_debug (thread_p, pgptr, __FILE__ , __LINE__ )`
define pgbuf_invalidate_all
#define pgbuf_invalidate_all (
thread_p,
volid
) `pgbuf_invalidate_all_debug (thread_p, volid, __FILE__ , __LINE__ )`
define pgbuf_ordered_fix
#define pgbuf_ordered_fix (
thread_p,
req_vpid,
fetch_mode,
requestmode,
req_watcher
) `pgbuf_ordered_fix_debug (thread_p, req_vpid , fetch_mode, requestmode , req_watcher , ARG_FILE_LINE_FUNC )`
define pgbuf_ordered_unfix
#define pgbuf_ordered_unfix (
thread_p,
watcher_object
) `pgbuf_ordered_unfix_debug (thread_p, watcher_object , ARG_FILE_LINE_FUNC )`
define pgbuf_ordered_unfix_and_init
#define pgbuf_ordered_unfix_and_init (
thread_p,
page,
pg_watcher
) `/* multi line expression */`
#define pgbuf_promote_read_latch (
thread_p,
pgptr_p,
condition
) `pgbuf_promote_read_latch_debug (thread_p, pgptr_p , condition, ARG_FILE_LINE_FUNC )`
define pgbuf_replace_watcher
#define pgbuf_replace_watcher (
thread_p,
old_watcher,
new_watcher
) `pgbuf_replace_watcher_debug (thread_p, old_watcher , new_watcher , \ __FILE__ , __LINE__ )`
define pgbuf_set_dirty
#define pgbuf_set_dirty (
...
) `pgbuf_set_dirty_debug ( __VA_ARGS__ , ARG_FILE_LINE_FUNC )`
define pgbuf_set_dirty_and_free
#define pgbuf_set_dirty_and_free (
thread_p,
pgptr
) `pgbuf_set_dirty (thread_p, pgptr, FREE ); pgptr = NULL`
define pgbuf_set_lsa
#define pgbuf_set_lsa (
...
) `pgbuf_set_lsa_debug ( __VA_ARGS__ , ARG_FILE_LINE_FUNC )`
define pgbuf_unfix
#define pgbuf_unfix (
thread_p,
pgptr
) `pgbuf_unfix_debug (thread_p, pgptr, ARG_FILE_LINE_FUNC )`
define pgbuf_unfix_and_init
#define pgbuf_unfix_and_init (
thread_p,
pgptr
) `/* multi line expression */`
define pgbuf_unfix_and_init_after_check
#define pgbuf_unfix_and_init_after_check (
thread_p,
pgptr
) `/* multi line expression */`
The documentation for this class was generated from the following file cubrid/src/storage/page_buffer.h