CUBRID Engine  latest
log_2pc.h File Reference
#include "log_comm.h"
#include "log_lsa.hpp"
#include "log_storage.hpp"
#include "thread_compat.hpp"
#include <cstdio>
Include dependency graph for log_2pc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  log_2pc_gtrinfo
 
struct  log_2pc_coordinator
 

Typedefs

typedef enum log_2pc_execute LOG_2PC_EXECUTE
 
typedef struct log_2pc_gtrinfo LOG_2PC_GTRINFO
 
typedef struct log_2pc_coordinator LOG_2PC_COORDINATOR
 

Enumerations

enum  log_2pc_execute { LOG_2PC_EXECUTE_FULL, LOG_2PC_EXECUTE_PREPARE, LOG_2PC_EXECUTE_COMMIT_DECISION, LOG_2PC_EXECUTE_ABORT_DECISION }
 

Functions

char * log_2pc_sprintf_particp (void *particp_id)
 
void log_2pc_dump_participants (FILE *fp, int block_length, void *block_particps_ids)
 
bool log_2pc_send_prepare (int gtrid, int num_particps, void *block_particps_ids)
 
bool log_2pc_send_commit_decision (int gtrid, int num_particps, int *particps_indices, void *block_particps_ids)
 
bool log_2pc_send_abort_decision (int gtrid, int num_particps, int *particps_indices, void *block_particps_ids, bool collect)
 
TRAN_STATE log_2pc_commit (THREAD_ENTRY *thread_p, log_tdes *tdes, LOG_2PC_EXECUTE execute_2pc_type, bool *decision)
 
int log_2pc_set_global_tran_info (THREAD_ENTRY *thread_p, int gtrid, void *info, int size)
 
int log_2pc_get_global_tran_info (THREAD_ENTRY *thread_p, int gtrid, void *buffer, int size)
 
int log_2pc_start (THREAD_ENTRY *thread_p)
 
TRAN_STATE log_2pc_prepare (THREAD_ENTRY *thread_p)
 
int log_2pc_recovery_prepared (THREAD_ENTRY *thread_p, int gtrids[], int size)
 
int log_2pc_attach_global_tran (THREAD_ENTRY *thread_p, int gtrid)
 
TRAN_STATE log_2pc_prepare_global_tran (THREAD_ENTRY *thread_p, int gtrid)
 
void log_2pc_read_prepare (THREAD_ENTRY *thread_p, int acquire_locks, log_tdes *tdes, LOG_LSA *lsa, LOG_PAGE *log_pgptr)
 
void log_2pc_dump_gtrinfo (FILE *fp, int length, void *data)
 
void log_2pc_dump_acqobj_locks (FILE *fp, int length, void *data)
 
log_tdeslog_2pc_alloc_coord_info (log_tdes *tdes, int num_particps, int particp_id_length, void *block_particps_ids)
 
void log_2pc_free_coord_info (log_tdes *tdes)
 
void log_2pc_recovery_analysis_info (THREAD_ENTRY *thread_p, log_tdes *tdes, LOG_LSA *upto_chain_lsa)
 
void log_2pc_recovery (THREAD_ENTRY *thread_p)
 
bool log_2pc_is_tran_distributed (log_tdes *tdes)
 
bool log_2pc_clear_and_is_tran_distributed (log_tdes *tdes)
 

Variables

const int LOG_2PC_NULL_GTRID = -1
 
const bool LOG_2PC_OBTAIN_LOCKS = true
 
const bool LOG_2PC_DONT_OBTAIN_LOCKS = false
 

Typedef Documentation

Definition at line 63 of file log_2pc.h.

Definition at line 54 of file log_2pc.h.

Definition at line 56 of file log_2pc.h.

Enumeration Type Documentation

Enumerator
LOG_2PC_EXECUTE_FULL 
LOG_2PC_EXECUTE_PREPARE 
LOG_2PC_EXECUTE_COMMIT_DECISION 
LOG_2PC_EXECUTE_ABORT_DECISION 

Definition at line 44 of file log_2pc.h.

Function Documentation

log_tdes* log_2pc_alloc_coord_info ( log_tdes tdes,
int  num_particps,
int  particp_id_length,
void *  block_particps_ids 
)
bool log_2pc_clear_and_is_tran_distributed ( log_tdes tdes)

Definition at line 2412 of file log_2pc.c.

References log_2pc_free_coord_info(), and log_2pc_is_tran_distributed().

Referenced by log_abort(), and log_commit().

Here is the caller graph for this function:

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

Definition at line 1450 of file log_2pc.c.

References lock_dump_acquired(), lk_acquired_locks::nobj_locks, and lk_acquired_locks::obj.

Referenced by log_dump_record_2pc_prepare_commit().

Here is the caller graph for this function:

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

Definition at line 1435 of file log_2pc.c.

Referenced by log_dump_record_2pc_prepare_commit().

Here is the caller graph for this function:

void log_2pc_dump_participants ( FILE *  fp,
int  block_length,
void *  block_particps_ids 
)

Definition at line 184 of file log_2pc.c.

References log_2pc_global_data::dump_participants, and NULL.

Referenced by log_dump_record_2pc_start().

Here is the caller graph for this function:

void log_2pc_free_coord_info ( log_tdes tdes)
bool log_2pc_is_tran_distributed ( log_tdes tdes)
int log_2pc_recovery_prepared ( THREAD_ENTRY thread_p,
int  gtrids[],
int  size 
)
bool log_2pc_send_abort_decision ( int  gtrid,
int  num_particps,
int *  particps_indices,
void *  block_particps_ids,
bool  collect 
)
bool log_2pc_send_commit_decision ( int  gtrid,
int  num_particps,
int *  particps_indices,
void *  block_particps_ids 
)

Definition at line 251 of file log_2pc.c.

References NULL, and log_2pc_global_data::send_commit.

Referenced by log_2pc_commit_second_phase(), log_2pc_recovery_commit_decision(), and log_2pc_recovery_committed_informing_participants().

Here is the caller graph for this function:

bool log_2pc_send_prepare ( int  gtrid,
int  num_particps,
void *  block_particps_ids 
)

Definition at line 214 of file log_2pc.c.

References NULL, and log_2pc_global_data::send_prepare.

Referenced by log_2pc_commit_first_phase().

Here is the caller graph for this function:

char* log_2pc_sprintf_particp ( void *  particp_id)

Definition at line 162 of file log_2pc.c.

References NULL, and log_2pc_global_data::sprintf_participant.

Referenced by logtb_dump_tdes_distribute_transaction().

Here is the caller graph for this function:

Variable Documentation

const bool LOG_2PC_DONT_OBTAIN_LOCKS = false

Definition at line 42 of file log_2pc.h.

Referenced by log_2pc_recovery_prepare(), and log_recovery_redo().

const bool LOG_2PC_OBTAIN_LOCKS = true

Definition at line 41 of file log_2pc.h.

Referenced by log_2pc_recovery_prepare(), and log_recovery_redo().