CUBRID Engine  latest
log_append.hpp File Reference
#include "log_lsa.hpp"
#include "log_record.hpp"
#include "log_storage.hpp"
#include "memory_alloc.h"
#include "object_representation_constants.h"
#include "recovery.h"
#include "storage_common.h"
#include <atomic>
#include <mutex>
Include dependency graph for log_append.hpp:

Go to the source code of this file.

Classes

struct  log_crumb
 
struct  log_data_addr
 
struct  log_append_info
 
struct  log_prior_node
 
struct  log_prior_lsa_info
 

Macros

#define LOG_DATA_ADDR_INITIALIZER   { NULL, NULL, 0 }
 

Typedefs

typedef struct log_crumb LOG_CRUMB
 
typedef struct log_data_addr LOG_DATA_ADDR
 
typedef struct log_append_info LOG_APPEND_INFO
 
typedef struct log_prior_node LOG_PRIOR_NODE
 
typedef struct log_prior_lsa_info LOG_PRIOR_LSA_INFO
 
using log_rv_record_flag_type = log_data_addr::offset_type
 

Enumerations

enum  LOG_PRIOR_LSA_LOCK { LOG_PRIOR_LSA_WITHOUT_LOCK = 0, LOG_PRIOR_LSA_WITH_LOCK = 1 }
 

Functions

bool LOG_RV_RECORD_IS_INSERT (log_rv_record_flag_type flags)
 
bool LOG_RV_RECORD_IS_DELETE (log_rv_record_flag_type flags)
 
bool LOG_RV_RECORD_IS_UPDATE_ALL (log_rv_record_flag_type flags)
 
bool LOG_RV_RECORD_IS_UPDATE_PARTIAL (log_rv_record_flag_type flags)
 
void LOG_RV_RECORD_SET_MODIFY_MODE (log_data_addr *addr, log_rv_record_flag_type mode)
 
constexpr size_t LOG_RV_RECORD_UPDPARTIAL_ALIGNED_SIZE (size_t new_data_size)
 
void LOG_RESET_APPEND_LSA (const LOG_LSA *lsa)
 
void LOG_RESET_PREV_LSA (const LOG_LSA *lsa)
 
char * LOG_APPEND_PTR ()
 
bool log_prior_has_worker_log_records (THREAD_ENTRY *thread_p)
 
LOG_PRIOR_NODEprior_lsa_alloc_and_copy_data (THREAD_ENTRY *thread_p, LOG_RECTYPE rec_type, LOG_RCVINDEX rcvindex, LOG_DATA_ADDR *addr, int ulength, const char *udata, int rlength, const char *rdata)
 
LOG_PRIOR_NODEprior_lsa_alloc_and_copy_crumbs (THREAD_ENTRY *thread_p, LOG_RECTYPE rec_type, LOG_RCVINDEX rcvindex, LOG_DATA_ADDR *addr, const int num_ucrumbs, const LOG_CRUMB *ucrumbs, const int num_rcrumbs, const LOG_CRUMB *rcrumbs)
 
LOG_LSA prior_lsa_next_record (THREAD_ENTRY *thread_p, LOG_PRIOR_NODE *node, log_tdes *tdes)
 
LOG_LSA prior_lsa_next_record_with_lock (THREAD_ENTRY *thread_p, LOG_PRIOR_NODE *node, log_tdes *tdes)
 
int prior_set_tde_encrypted (log_prior_node *node, LOG_RCVINDEX recvindex)
 
bool prior_is_tde_encrypted (const log_prior_node *node)
 
void log_append_init_zip ()
 
void log_append_final_zip ()
 
size_t logpb_get_memsize ()
 

Variables

const log_rv_record_flag_type LOG_RV_RECORD_INSERT = (log_rv_record_flag_type) 0x8000
 
const log_rv_record_flag_type LOG_RV_RECORD_DELETE = 0x4000
 
const log_rv_record_flag_type LOG_RV_RECORD_UPDATE_ALL = (log_rv_record_flag_type) 0xC000
 
const log_rv_record_flag_type LOG_RV_RECORD_UPDATE_PARTIAL = 0x0000
 
const log_rv_record_flag_type LOG_RV_RECORD_MODIFY_MASK = (log_rv_record_flag_type) 0xC000
 

Macro Definition Documentation

Typedef Documentation

Definition at line 71 of file log_append.hpp.

typedef struct log_crumb LOG_CRUMB

Definition at line 44 of file log_append.hpp.

typedef struct log_data_addr LOG_DATA_ADDR

Definition at line 51 of file log_append.hpp.

Definition at line 110 of file log_append.hpp.

Definition at line 89 of file log_append.hpp.

Enumeration Type Documentation

Enumerator
LOG_PRIOR_LSA_WITHOUT_LOCK 
LOG_PRIOR_LSA_WITH_LOCK 

Definition at line 65 of file log_append.hpp.

Function Documentation

void log_append_final_zip ( )

Definition at line 232 of file log_append.cpp.

References free_and_init, log_data_length, log_data_ptr, log_zip_free(), log_Zip_support, and NULL.

Referenced by logpb_finalize_pool().

Here is the caller graph for this function:

void log_append_init_zip ( )
char* LOG_APPEND_PTR ( )
void LOG_RESET_PREV_LSA ( const LOG_LSA lsa)
bool LOG_RV_RECORD_IS_DELETE ( log_rv_record_flag_type  flags)
inline

Definition at line 180 of file log_append.hpp.

References LOG_RV_RECORD_DELETE, and LOG_RV_RECORD_MODIFY_MASK.

Referenced by btree_rv_record_modify_internal(), and log_rv_record_modify_internal().

Here is the caller graph for this function:

bool LOG_RV_RECORD_IS_INSERT ( log_rv_record_flag_type  flags)
inline

Definition at line 174 of file log_append.hpp.

References LOG_RV_RECORD_INSERT, and LOG_RV_RECORD_MODIFY_MASK.

Referenced by btree_rv_record_modify_internal(), and log_rv_record_modify_internal().

Here is the caller graph for this function:

bool LOG_RV_RECORD_IS_UPDATE_ALL ( log_rv_record_flag_type  flags)
inline

Definition at line 186 of file log_append.hpp.

References LOG_RV_RECORD_MODIFY_MASK, and LOG_RV_RECORD_UPDATE_ALL.

Referenced by btree_rv_record_modify_internal(), and log_rv_record_modify_internal().

Here is the caller graph for this function:

bool LOG_RV_RECORD_IS_UPDATE_PARTIAL ( log_rv_record_flag_type  flags)
inline

Definition at line 192 of file log_append.hpp.

References LOG_RV_RECORD_MODIFY_MASK, and LOG_RV_RECORD_UPDATE_PARTIAL.

Referenced by btree_rv_record_modify_internal(), and log_rv_record_modify_internal().

Here is the caller graph for this function:

constexpr size_t LOG_RV_RECORD_UPDPARTIAL_ALIGNED_SIZE ( size_t  new_data_size)

Definition at line 204 of file log_append.hpp.

References DB_ALIGN, INT_ALIGNMENT, OR_BYTE_SIZE, and OR_SHORT_SIZE.

size_t logpb_get_memsize ( )

Definition at line 11374 of file log_page_buffer.c.

References LOG_PAGESIZE, and log_pb_global_data::num_buffers.

Referenced by prior_lsa_next_record_internal().

Here is the caller graph for this function:

bool prior_is_tde_encrypted ( const log_prior_node node)

Definition at line 1567 of file log_append.cpp.

References log_prior_node::tde_encrypted.

Referenced by logpb_append_next_record().

Here is the caller graph for this function:

LOG_PRIOR_NODE* prior_lsa_alloc_and_copy_data ( THREAD_ENTRY thread_p,
LOG_RECTYPE  rec_type,
LOG_RCVINDEX  rcvindex,
LOG_DATA_ADDR addr,
int  ulength,
const char *  udata,
int  rlength,
const char *  rdata 
)

Definition at line 273 of file log_append.cpp.

References ARG_FILE_LINE, assert, assert_release, log_prior_node::data_header, ER_ERROR_SEVERITY, ER_FAILED, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), free_and_init, LOG_2PC_ABORT_DECISION, LOG_2PC_ABORT_INFORM_PARTICPS, LOG_2PC_COMMIT_DECISION, LOG_2PC_COMMIT_INFORM_PARTICPS, LOG_2PC_PREPARE, LOG_2PC_START, LOG_ABORT, LOG_COMMIT, LOG_COMMIT_WITH_POSTPONE, LOG_COMPENSATE, LOG_DBEXTERN_REDO_DATA, LOG_DIFF_UNDOREDO_DATA, LOG_DUMMY_CRASH_RECOVERY, LOG_DUMMY_GENERIC, LOG_DUMMY_HA_SERVER_STATE, LOG_DUMMY_HEAD_POSTPONE, LOG_DUMMY_OVF_RECORD, LOG_END_CHKPT, log_prior_node::log_header, LOG_MVCC_DIFF_UNDOREDO_DATA, LOG_MVCC_REDO_DATA, LOG_MVCC_UNDO_DATA, LOG_MVCC_UNDOREDO_DATA, LOG_POSTPONE, LOG_REDO_DATA, LOG_REPLICATION_DATA, LOG_REPLICATION_STATEMENT, LOG_RUN_POSTPONE, LOG_SAVEPOINT, LOG_START_CHKPT, LOG_SYSOP_ATOMIC_START, LOG_SYSOP_END, LOG_SYSOP_START_POSTPONE, LOG_UNDO_DATA, LOG_UNDOREDO_DATA, log_prior_node::next, NO_ERROR, NULL, prior_lsa_gen_2pc_prepare_record(), prior_lsa_gen_dbout_redo_record(), prior_lsa_gen_end_chkpt_record(), prior_lsa_gen_postpone_record(), prior_lsa_gen_record(), log_prior_node::rdata, log_prior_node::rlength, log_prior_node::tde_encrypted, log_rec_header::type, log_prior_node::udata, and log_prior_node::ulength.

Referenced by log_2pc_append_decision(), log_2pc_append_start(), log_2pc_prepare_global_tran(), log_append_commit_postpone(), log_append_compensate_internal(), log_append_dboutside_redo(), log_append_donetime_internal(), log_append_empty_record(), log_append_ha_server_state(), log_append_postpone(), log_append_repl_info_internal(), log_append_run_postpone(), log_append_savepoint(), log_append_sysop_end(), log_append_sysop_start_postpone(), log_complete_for_2pc(), log_sysop_start_atomic(), and logpb_checkpoint().

Here is the caller graph for this function:

LOG_LSA prior_lsa_next_record_with_lock ( THREAD_ENTRY thread_p,
LOG_PRIOR_NODE node,
log_tdes tdes 
)

Definition at line 1543 of file log_append.cpp.

References LOG_PRIOR_LSA_WITH_LOCK, and prior_lsa_next_record_internal().

Referenced by log_append_donetime_internal(), log_append_repl_info_internal(), and logpb_checkpoint().

Here is the caller graph for this function:

Variable Documentation

const log_rv_record_flag_type LOG_RV_RECORD_DELETE = 0x4000

Definition at line 135 of file log_append.hpp.

Referenced by btree_delete_key_from_leaf(), and LOG_RV_RECORD_IS_DELETE().

const log_rv_record_flag_type LOG_RV_RECORD_UPDATE_ALL = (log_rv_record_flag_type) 0xC000

Definition at line 136 of file log_append.hpp.

Referenced by btree_modify_overflow_link(), and LOG_RV_RECORD_IS_UPDATE_ALL().