CUBRID Engine
latest
|
#include "log_2pc.h"
#include "config.h"
#include "error_manager.h"
#include "lock_manager.h"
#include "log_append.hpp"
#include "log_comm.h"
#include "log_impl.h"
#include "log_lsa.hpp"
#include "log_manager.h"
#include "memory_alloc.h"
#include "page_buffer.h"
#include "storage_common.h"
#include "system_parameter.h"
#include "tcp.h"
#include <stddef.h>
#include <string.h>
#include <limits.h>
#include <assert.h>
#include <sys/types.h>
Go to the source code of this file.
Classes | |
struct | log_2pc_global_data |
Macros | |
#define | CSS_ENABLE_INTERRUPTS |
Functions | |
static int | log_2pc_get_num_participants (int *partid_len, void **block_particps_ids) |
static int | log_2pc_make_global_tran_id (TRANID tranid) |
static bool | log_2pc_check_duplicate_global_tran_id (int gtrid) |
static int | log_2pc_commit_first_phase (THREAD_ENTRY *thread_p, LOG_TDES *tdes, LOG_2PC_EXECUTE execute_2pc_type, bool *decision) |
static TRAN_STATE | log_2pc_commit_second_phase (THREAD_ENTRY *thread_p, LOG_TDES *tdes, bool *decision) |
static void | log_2pc_append_start (THREAD_ENTRY *thread_p, LOG_TDES *tdes) |
static void | log_2pc_append_decision (THREAD_ENTRY *thread_p, LOG_TDES *tdes, LOG_RECTYPE decsion) |
static LOG_TDES * | log_2pc_find_tran_descriptor (int gtrid) |
static int | log_2pc_attach_client (THREAD_ENTRY *thread_p, LOG_TDES *tdes, LOG_TDES *client_tdes) |
static void | log_2pc_recovery_prepare (THREAD_ENTRY *thread_p, LOG_TDES *tdes, LOG_LSA *log_lsa, LOG_PAGE *log_page_p) |
static int | log_2pc_recovery_start (THREAD_ENTRY *thread_p, LOG_TDES *tdes, LOG_LSA *log_lsa, LOG_PAGE *log_page_p, int *ack_list, int *ack_count) |
static int * | log_2pc_expand_ack_list (THREAD_ENTRY *thread_p, int *ack_list, int *ack_count, int *size_ack_list) |
static void | log_2pc_recovery_recv_ack (THREAD_ENTRY *thread_p, LOG_LSA *log_lsa, LOG_PAGE *log_page_p, int *ack_list, int *ack_count) |
static int | log_2pc_recovery_analysis_record (THREAD_ENTRY *thread_p, LOG_RECTYPE record_type, LOG_TDES *tdes, LOG_LSA *log_lsa, LOG_PAGE *log_page_p, int **ack_list, int *ack_count, int *size_ack_list, bool *search_2pc_prepare, bool *search_2pc_start) |
static void | log_2pc_recovery_collecting_participant_votes (THREAD_ENTRY *thread_p, LOG_TDES *tdes) |
static void | log_2pc_recovery_abort_decision (THREAD_ENTRY *thread_p, LOG_TDES *tdes) |
static void | log_2pc_recovery_commit_decision (THREAD_ENTRY *thread_p, LOG_TDES *tdes) |
static void | log_2pc_recovery_committed_informing_participants (THREAD_ENTRY *thread_p, LOG_TDES *tdes) |
static void | log_2pc_recovery_aborted_informing_participants (THREAD_ENTRY *thread_p, LOG_TDES *tdes) |
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 *log_lsa, LOG_PAGE *log_page_p) |
void | log_2pc_dump_gtrinfo (FILE *fp, int length, void *data) |
void | log_2pc_dump_acqobj_locks (FILE *fp, int length, void *data) |
log_tdes * | log_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 | |
struct log_2pc_global_data | log_2pc_Userfun = { NULL, NULL, NULL, NULL, NULL, NULL, NULL } |
log_tdes* log_2pc_alloc_coord_info | ( | log_tdes * | tdes, |
int | num_particps, | ||
int | particp_id_length, | ||
void * | block_particps_ids | ||
) |
Definition at line 1581 of file log_2pc.c.
References log_2pc_coordinator::ack_received, log_2pc_coordinator::block_particps_ids, log_tdes::coord, NULL, log_2pc_coordinator::num_particps, and log_2pc_coordinator::particp_id_length.
Referenced by log_2pc_is_tran_distributed(), log_2pc_recovery_start(), and log_recovery_redo().
|
static |
Definition at line 1529 of file log_2pc.c.
References LOG_2PC_COMMIT_DECISION, logpb_flush_pages(), NULL, prior_lsa_alloc_and_copy_data(), prior_lsa_next_record(), RV_NOT_DEFINED, log_tdes::state, TRAN_UNACTIVE_2PC_ABORT_DECISION, and TRAN_UNACTIVE_2PC_COMMIT_DECISION.
Referenced by log_2pc_commit_second_phase(), and log_2pc_recovery_collecting_participant_votes().
|
static |
Definition at line 1472 of file log_2pc.c.
References log_2pc_coordinator::block_particps_ids, log_tdes::client, log_tdes::coord, log_prior_node::data_header, DB_MAX_USER_LENGTH, clientids::get_db_user(), log_rec_2pc_start::gtrid, log_tdes::gtrid, LOG_2PC_START, logpb_flush_pages(), NULL, log_2pc_coordinator::num_particps, log_rec_2pc_start::num_particps, log_2pc_coordinator::particp_id_length, log_rec_2pc_start::particp_id_length, prior_lsa_alloc_and_copy_data(), prior_lsa_next_record(), RV_NOT_DEFINED, log_tdes::state, TRAN_UNACTIVE_2PC_COLLECTING_PARTICIPANT_VOTES, and log_rec_2pc_start::user_name.
Referenced by log_2pc_commit_first_phase().
|
static |
Definition at line 1028 of file log_2pc.c.
References log_tdes::isloose_end, log_tdes::isolation, log_abort(), log_Gl, LOG_SET_CURRENT_TRAN_INDEX, logtb_free_tran_index(), NO_ERROR, NULL_TRAN_INDEX, trantable::num_prepared_loose_end_indices, log_tdes::tran_index, log_global::trantable, and log_tdes::wait_msecs.
Referenced by log_2pc_attach_global_tran().
int log_2pc_attach_global_tran | ( | THREAD_ENTRY * | thread_p, |
int | gtrid | ||
) |
Definition at line 1080 of file log_2pc.c.
References ARG_FILE_LINE, assert, ER_ERROR_SEVERITY, ER_FATAL_ERROR_SEVERITY, ER_LOG_2PC_CANNOT_ATTACH, ER_LOG_2PC_UNKNOWN_GTID, ER_LOG_UNKNOWN_TRANINDEX, er_set(), error(), log_2pc_attach_client(), log_2pc_find_tran_descriptor(), LOG_2PC_NULL_GTRID, LOG_FIND_TDES(), LOG_FIND_THREAD_TRAN_INDEX, log_Gl, LOG_ISTRAN_2PC, NO_ERROR, NULL, NULL_TRAN_INDEX, trantable::num_prepared_loose_end_indices, TR_TABLE_CS_ENTER, TR_TABLE_CS_EXIT, log_tdes::tran_index, log_global::trantable, and log_tdes::trid.
Referenced by xtran_server_2pc_attach_global_tran().
|
static |
Definition at line 446 of file log_2pc.c.
References log_tdes::gtrid, i, LOG_2PC_NULL_GTRID, LOG_FIND_TDES(), log_Gl, LOG_SYSTEM_TRAN_INDEX, NULL, NULL_TRANID, trantable::num_total_indices, log_global::trantable, and log_tdes::trid.
Referenced by log_2pc_make_global_tran_id().
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().
TRAN_STATE log_2pc_commit | ( | THREAD_ENTRY * | thread_p, |
log_tdes * | tdes, | ||
LOG_2PC_EXECUTE | execute_2pc_type, | ||
bool * | decision | ||
) |
Definition at line 676 of file log_2pc.c.
References log_tdes::gtrid, log_2pc_commit_first_phase(), log_2pc_commit_second_phase(), LOG_2PC_EXECUTE_COMMIT_DECISION, LOG_2PC_EXECUTE_FULL, LOG_2PC_EXECUTE_PREPARE, log_2pc_make_global_tran_id(), LOG_2PC_NULL_GTRID, NO_ERROR, log_tdes::state, TR_TABLE_CS_ENTER, TR_TABLE_CS_EXIT, and log_tdes::trid.
Referenced by log_2pc_prepare_global_tran(), log_abort(), and log_commit().
|
static |
Definition at line 476 of file log_2pc.c.
References log_2pc_coordinator::ack_received, ARG_FILE_LINE, log_2pc_coordinator::block_particps_ids, log_tdes::coord, ER_FAILED, ER_OUT_OF_VIRTUAL_MEMORY, log_tdes::gtrid, i, lock_unlock_all_shared_get_all_exclusive(), log_2pc_append_start(), LOG_2PC_EXECUTE_FULL, log_2pc_send_prepare(), logpb_fatal_error(), NO_ERROR, NULL, log_2pc_coordinator::num_particps, log_tdes::state, and TRAN_ACTIVE.
Referenced by log_2pc_commit().
|
static |
Definition at line 549 of file log_2pc.c.
References log_2pc_coordinator::ack_received, log_2pc_coordinator::block_particps_ids, log_tdes::coord, log_tdes::gtrid, LOG_2PC_ABORT_DECISION, log_2pc_append_decision(), LOG_2PC_COMMIT_DECISION, log_2pc_send_abort_decision(), log_2pc_send_commit_decision(), LOG_ABORT, log_abort_local(), LOG_COMMIT, log_commit_local(), log_complete_for_2pc(), LOG_NEED_NEWTRID, NULL, log_2pc_coordinator::num_particps, log_tdes::state, TRAN_ACTIVE, and TRAN_UNACTIVE_ABORTED.
Referenced by log_2pc_commit().
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().
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().
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().
|
static |
Definition at line 1776 of file log_2pc.c.
References ARG_FILE_LINE, logpb_fatal_error(), and NULL.
Referenced by log_2pc_recovery_analysis_record().
|
static |
Definition at line 996 of file log_2pc.c.
References log_tdes::gtrid, i, LOG_2PC_NULL_GTRID, LOG_FIND_TDES(), log_Gl, LOG_ISTRAN_2PC_PREPARE, NULL, NULL_TRANID, trantable::num_total_indices, log_global::trantable, and log_tdes::trid.
Referenced by log_2pc_attach_global_tran().
void log_2pc_free_coord_info | ( | log_tdes * | tdes | ) |
Definition at line 1611 of file log_2pc.c.
References log_2pc_coordinator::ack_received, log_2pc_coordinator::block_particps_ids, log_tdes::coord, free_and_init, and NULL.
Referenced by log_2pc_clear_and_is_tran_distributed(), log_2pc_recovery_start(), and logtb_clear_tdes().
int log_2pc_get_global_tran_info | ( | THREAD_ENTRY * | thread_p, |
int | gtrid, | ||
void * | buffer, | ||
int | size | ||
) |
Definition at line 816 of file log_2pc.c.
References ARG_FILE_LINE, assert, ER_ERROR_SEVERITY, ER_LOG_2PC_UNKNOWN_GTID, ER_LOG_CANNOT_SET_GTRINFO, er_set(), log_tdes::gtrid, log_tdes::gtrinfo, i, log_2pc_gtrinfo::info_data, log_2pc_gtrinfo::info_length, LOG_2PC_NULL_GTRID, LOG_FIND_TDES(), log_Gl, NO_ERROR, NULL, NULL_TRANID, trantable::num_total_indices, TR_TABLE_CS_ENTER, TR_TABLE_CS_EXIT, log_global::trantable, and log_tdes::trid.
Referenced by xtran_server_get_global_tran_info().
|
static |
Definition at line 120 of file log_2pc.c.
References log_2pc_global_data::get_participants, and NULL.
Referenced by log_2pc_is_tran_distributed().
Definition at line 2373 of file log_2pc.c.
References log_tdes::coord, log_2pc_alloc_coord_info(), log_2pc_get_num_participants(), and NULL.
Referenced by log_2pc_clear_and_is_tran_distributed(), log_2pc_prepare_global_tran(), and log_2pc_send_abort_decision().
|
static |
Definition at line 362 of file log_2pc.c.
References css_gethostid(), i, log_2pc_check_duplicate_global_tran_id(), and LOG_2PC_NULL_GTRID.
Referenced by log_2pc_commit(), log_2pc_send_abort_decision(), and log_2pc_start().
TRAN_STATE log_2pc_prepare | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 921 of file log_2pc.c.
References ARG_FILE_LINE, ER_FATAL_ERROR_SEVERITY, ER_LOG_2PC_NOT_STARTED, ER_LOG_UNKNOWN_TRANINDEX, er_set(), log_tdes::gtrid, LOG_2PC_NULL_GTRID, log_2pc_prepare_global_tran(), LOG_FIND_TDES(), LOG_FIND_THREAD_TRAN_INDEX, NULL, log_tdes::state, TRAN_UNACTIVE_UNKNOWN, and log_tdes::trid.
Referenced by xtran_server_2pc_prepare().
TRAN_STATE log_2pc_prepare_global_tran | ( | THREAD_ENTRY * | thread_p, |
int | gtrid | ||
) |
Definition at line 1162 of file log_2pc.c.
References ARG_FILE_LINE, assert, log_tdes::client, log_prior_node::data_header, DB_MAX_USER_LENGTH, ER_ERROR_SEVERITY, ER_FATAL_ERROR_SEVERITY, ER_LOG_2PC_NON_UNIQUE_GTID, er_log_debug, ER_LOG_UNKNOWN_TRANINDEX, er_set(), free_and_init, clientids::get_db_user(), log_rec_2pc_prepcommit::gtrid, log_tdes::gtrid, log_tdes::gtrinfo, log_rec_2pc_prepcommit::gtrinfo_length, i, log_2pc_gtrinfo::info_data, log_2pc_gtrinfo::info_length, log_topops_stack::last, lock_unlock_all_shared_get_all_exclusive(), log_2pc_commit(), LOG_2PC_EXECUTE_PREPARE, log_2pc_is_tran_distributed(), LOG_2PC_NULL_GTRID, LOG_2PC_PREPARE, LOG_FIND_TDES(), LOG_FIND_THREAD_TRAN_INDEX, log_Gl, LOG_ISTRAN_ACTIVE, log_state_string(), log_sysop_attach_to_outer(), logpb_flush_pages(), lk_acquired_locks::nobj_locks, NULL, NULL_TRANID, log_rec_2pc_prepcommit::num_object_locks, log_rec_2pc_prepcommit::num_page_locks, trantable::num_total_indices, lk_acquired_locks::obj, prior_lsa_alloc_and_copy_data(), prior_lsa_next_record(), RV_NOT_DEFINED, log_tdes::state, log_tdes::topops, TR_TABLE_CS_ENTER, TR_TABLE_CS_EXIT, log_tdes::tran_index, TRAN_UNACTIVE_2PC_PREPARE, TRAN_UNACTIVE_UNKNOWN, log_global::trantable, log_tdes::trid, and log_rec_2pc_prepcommit::user_name.
Referenced by log_2pc_prepare(), and xtran_server_2pc_prepare_global_tran().
void log_2pc_read_prepare | ( | THREAD_ENTRY * | thread_p, |
int | acquire_locks, | ||
log_tdes * | tdes, | ||
LOG_LSA * | log_lsa, | ||
LOG_PAGE * | log_page_p | ||
) |
Definition at line 1349 of file log_2pc.c.
References log_page::area, ARG_FILE_LINE, log_tdes::client, free_and_init, log_rec_2pc_prepcommit::gtrid, log_tdes::gtrid, log_tdes::gtrinfo, log_rec_2pc_prepcommit::gtrinfo_length, log_2pc_gtrinfo::info_data, log_2pc_gtrinfo::info_length, LK_GRANTED, lock_reacquire_crash_locks(), LOG_READ_ADD_ALIGN, LOG_READ_ADVANCE_WHEN_DOESNT_FIT, LOG_READ_ALIGN, logpb_copy_from_log(), logpb_fatal_error(), lk_acquired_locks::nobj_locks, NULL, log_rec_2pc_prepcommit::num_object_locks, lk_acquired_locks::obj, log_lsa::offset, clientids::set_system_internal_with_user(), log_tdes::tran_index, and log_rec_2pc_prepcommit::user_name.
Referenced by log_2pc_recovery_prepare(), and log_recovery_redo().
void log_2pc_recovery | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 2262 of file log_2pc.c.
References ARG_FILE_LINE, ER_FATAL_ERROR_SEVERITY, ER_LOG_UNKNOWN_TRANINDEX, er_set(), i, log_2pc_recovery_abort_decision(), log_2pc_recovery_aborted_informing_participants(), log_2pc_recovery_collecting_participant_votes(), log_2pc_recovery_commit_decision(), log_2pc_recovery_committed_informing_participants(), LOG_FIND_TDES(), LOG_FIND_THREAD_TRAN_INDEX, log_Gl, LOG_ISTRAN_2PC, LOG_SET_CURRENT_TRAN_INDEX, NULL, NULL_TRANID, trantable::num_total_indices, log_tdes::state, TRAN_ACTIVE, TRAN_RECOVERY, TRAN_UNACTIVE_2PC_ABORT_DECISION, TRAN_UNACTIVE_2PC_COLLECTING_PARTICIPANT_VOTES, TRAN_UNACTIVE_2PC_COMMIT_DECISION, TRAN_UNACTIVE_2PC_PREPARE, TRAN_UNACTIVE_ABORTED, TRAN_UNACTIVE_ABORTED_INFORMING_PARTICIPANTS, TRAN_UNACTIVE_COMMITTED, TRAN_UNACTIVE_COMMITTED_INFORMING_PARTICIPANTS, TRAN_UNACTIVE_COMMITTED_WITH_POSTPONE, TRAN_UNACTIVE_TOPOPE_COMMITTED_WITH_POSTPONE, TRAN_UNACTIVE_UNILATERALLY_ABORTED, TRAN_UNACTIVE_UNKNOWN, TRAN_UNACTIVE_WILL_COMMIT, log_global::trantable, and log_tdes::trid.
Referenced by log_recovery().
|
static |
Definition at line 2124 of file log_2pc.c.
References log_2pc_coordinator::ack_received, log_2pc_coordinator::block_particps_ids, log_tdes::coord, log_tdes::gtrid, log_2pc_send_abort_decision(), LOG_ABORT, log_abort_local(), log_complete_for_2pc(), LOG_DONT_NEED_NEWTRID, log_2pc_coordinator::num_particps, log_tdes::state, and TRAN_UNACTIVE_ABORTED.
Referenced by log_2pc_recovery(), and log_2pc_recovery_collecting_participant_votes().
|
static |
Definition at line 2235 of file log_2pc.c.
References log_2pc_coordinator::ack_received, log_2pc_coordinator::block_particps_ids, log_tdes::coord, log_tdes::gtrid, log_2pc_send_abort_decision(), LOG_ABORT, log_complete_for_2pc(), LOG_DONT_NEED_NEWTRID, and log_2pc_coordinator::num_particps.
Referenced by log_2pc_recovery().
void log_2pc_recovery_analysis_info | ( | THREAD_ENTRY * | thread_p, |
log_tdes * | tdes, | ||
LOG_LSA * | upto_chain_lsa | ||
) |
Definition at line 1988 of file log_2pc.c.
References ARG_FILE_LINE, log_tdes::coord, er_log_debug, free_and_init, log_tdes::gtrid, IO_MAX_PAGE_SIZE, LOG_2PC_NULL_GTRID, log_2pc_recovery_analysis_record(), LOG_CS_FORCE_USE, LOG_GET_LOG_RECORD_HEADER, LOG_ISTRAN_2PC, log_state_string(), logpb_fatal_error(), logpb_fetch_page(), LSA_COPY(), LSA_ISNULL(), LSA_SET_NULL(), MAX_ALIGNMENT, NO_ERROR, NULL, log_lsa::offset, log_lsa::pageid, log_rec_header::prev_tranlsa, PTR_ALIGN, log_tdes::state, TRAN_UNACTIVE_2PC_PREPARE, log_tdes::trid, and log_rec_header::type.
Referenced by log_recovery_analysis().
|
static |
Definition at line 1863 of file log_2pc.c.
References ARG_FILE_LINE, ER_ERROR_SEVERITY, er_log_debug, ER_LOG_PAGE_CORRUPTED, er_set(), LOG_2PC_ABORT_DECISION, LOG_2PC_ABORT_INFORM_PARTICPS, LOG_2PC_COMMIT_DECISION, LOG_2PC_COMMIT_INFORM_PARTICPS, log_2pc_expand_ack_list(), LOG_2PC_PREPARE, log_2pc_recovery_prepare(), log_2pc_recovery_recv_ack(), log_2pc_recovery_start(), LOG_2PC_RECV_ACK, 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_HEAD_POSTPONE, LOG_END_CHKPT, LOG_END_OF_LOG, LOG_ISTRAN_2PC_IN_SECOND_PHASE, LOG_LARGER_LOGREC_TYPE, 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_SMALLER_LOGREC_TYPE, LOG_START_CHKPT, LOG_SYSOP_END, LOG_SYSOP_START_POSTPONE, LOG_UNDO_DATA, LOG_UNDOREDO_DATA, LOG_WILL_COMMIT, NO_ERROR, and log_lsa::pageid.
Referenced by log_2pc_recovery_analysis_info().
|
static |
Definition at line 2102 of file log_2pc.c.
References LOG_2PC_ABORT_DECISION, log_2pc_append_decision(), and log_2pc_recovery_abort_decision().
Referenced by log_2pc_recovery().
|
static |
Definition at line 2175 of file log_2pc.c.
References log_2pc_coordinator::ack_received, log_2pc_coordinator::block_particps_ids, log_tdes::coord, log_tdes::gtrid, log_2pc_send_commit_decision(), LOG_COMMIT, log_commit_local(), log_complete_for_2pc(), LOG_DONT_NEED_NEWTRID, log_2pc_coordinator::num_particps, and log_tdes::state.
Referenced by log_2pc_recovery().
|
static |
Definition at line 2209 of file log_2pc.c.
References log_2pc_coordinator::ack_received, log_2pc_coordinator::block_particps_ids, log_tdes::coord, log_tdes::gtrid, log_2pc_send_commit_decision(), LOG_COMMIT, log_complete_for_2pc(), LOG_DONT_NEED_NEWTRID, and log_2pc_coordinator::num_particps.
Referenced by log_2pc_recovery().
|
static |
Definition at line 1641 of file log_2pc.c.
References LOG_2PC_DONT_OBTAIN_LOCKS, LOG_2PC_OBTAIN_LOCKS, log_2pc_read_prepare(), LOG_READ_ADD_ALIGN, log_tdes::state, and TRAN_UNACTIVE_2PC_PREPARE.
Referenced by log_2pc_recovery_analysis_record().
int log_2pc_recovery_prepared | ( | THREAD_ENTRY * | thread_p, |
int | gtrids[], | ||
int | size | ||
) |
Definition at line 959 of file log_2pc.c.
References assert, cubregex::count(), log_tdes::gtrid, i, LOG_2PC_NULL_GTRID, LOG_FIND_TDES(), log_Gl, LOG_ISTRAN_2PC_PREPARE, NULL, NULL_TRANID, trantable::num_total_indices, TR_TABLE_CS_ENTER, TR_TABLE_CS_EXIT, log_global::trantable, and log_tdes::trid.
Referenced by xtran_server_2pc_recovery_prepared().
|
static |
Definition at line 1832 of file log_2pc.c.
References log_page::area, LOG_READ_ADD_ALIGN, LOG_READ_ADVANCE_WHEN_DOESNT_FIT, log_lsa::offset, and log_rec_2pc_particp_ack::particp_index.
Referenced by log_2pc_recovery_analysis_record().
|
static |
Definition at line 1678 of file log_2pc.c.
References log_2pc_coordinator::ack_received, log_page::area, ARG_FILE_LINE, log_tdes::client, log_tdes::coord, ER_FAILED, er_log_debug, ER_OUT_OF_VIRTUAL_MEMORY, free_and_init, log_rec_2pc_start::gtrid, log_tdes::gtrid, i, log_2pc_alloc_coord_info(), log_2pc_free_coord_info(), LOG_READ_ADD_ALIGN, LOG_READ_ADVANCE_WHEN_DOESNT_FIT, LOG_READ_ALIGN, logpb_copy_from_log(), logpb_fatal_error(), NO_ERROR, NULL, log_2pc_coordinator::num_particps, log_rec_2pc_start::num_particps, log_lsa::offset, log_lsa::pageid, log_rec_2pc_start::particp_id_length, clientids::set_system_internal_with_user(), and log_rec_2pc_start::user_name.
Referenced by log_2pc_recovery_analysis_record().
bool log_2pc_send_abort_decision | ( | int | gtrid, |
int | num_particps, | ||
int * | particps_indices, | ||
void * | block_particps_ids, | ||
bool | collect | ||
) |
Definition at line 295 of file log_2pc.c.
References log_tdes::gtrid, log_2pc_is_tran_distributed(), log_2pc_make_global_tran_id(), LOG_2PC_NULL_GTRID, LOG_FIND_TDES(), LOG_FIND_THREAD_TRAN_INDEX, NULL, log_2pc_global_data::send_abort, TR_TABLE_CS_ENTER, TR_TABLE_CS_EXIT, and log_tdes::trid.
Referenced by log_2pc_commit_second_phase(), log_2pc_recovery_abort_decision(), and log_2pc_recovery_aborted_informing_participants().
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().
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().
int log_2pc_set_global_tran_info | ( | THREAD_ENTRY * | thread_p, |
int | gtrid, | ||
void * | info, | ||
int | size | ||
) |
Definition at line 749 of file log_2pc.c.
References ARG_FILE_LINE, ER_ERROR_SEVERITY, ER_LOG_2PC_UNKNOWN_GTID, ER_LOG_CANNOT_SET_GTRINFO, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), free_and_init, log_tdes::gtrid, log_tdes::gtrinfo, i, log_2pc_gtrinfo::info_data, log_2pc_gtrinfo::info_length, LOG_2PC_NULL_GTRID, LOG_FIND_TDES(), log_Gl, LOG_ISTRAN_2PC, log_state_string(), NO_ERROR, NULL, NULL_TRANID, trantable::num_total_indices, log_tdes::state, TR_TABLE_CS_ENTER, TR_TABLE_CS_EXIT, log_global::trantable, and log_tdes::trid.
Referenced by xtran_server_set_global_tran_info().
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().
int log_2pc_start | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 877 of file log_2pc.c.
References ARG_FILE_LINE, ER_FATAL_ERROR_SEVERITY, ER_LOG_2PC_CANNOT_START, ER_LOG_UNKNOWN_TRANINDEX, er_set(), log_tdes::gtrid, log_2pc_make_global_tran_id(), LOG_2PC_NULL_GTRID, LOG_FIND_TDES(), LOG_FIND_THREAD_TRAN_INDEX, LOG_ISTRAN_ACTIVE, log_state_string(), NULL, log_tdes::state, TR_TABLE_CS_ENTER, TR_TABLE_CS_EXIT, and log_tdes::trid.
Referenced by xtran_server_2pc_start().