35 #if defined(SERVER_MODE) 38 #if defined(ENABLE_SYSTEMTAP) 81 state =
log_commit (thread_p, tran_index, retain_lock);
83 #if defined(ENABLE_SYSTEMTAP) 86 CUBRID_TRAN_COMMIT (tran_index);
121 state =
log_abort (thread_p, tran_index);
123 #if defined(ENABLE_SYSTEMTAP) 124 CUBRID_TRAN_ABORT (tran_index, state);
130 #if defined (ENABLE_UNUSED_FUNCTION) 142 tran_server_unilaterally_abort (
THREAD_ENTRY * thread_p,
int tran_index)
146 const char *client_prog_name;
147 const char *client_user_name;
148 const char *client_host_name;
151 if (thread_p ==
NULL)
167 client_host_name, client_pid);
173 #if defined(SERVER_MODE) 185 if (thread_p ==
NULL)
248 bool drop_transient_class =
false;
272 drop_transient_class =
true;
284 if (drop_transient_class)
590 #if defined(SERVER_MODE) 591 size_t prev_thrd_cnt, thrd_cnt;
593 int tran_index, client_id;
596 if (thread_p ==
NULL)
601 p = thread_p->conn_entry;
607 tran_index = thread_p->tran_index;
612 if (prev_thrd_cnt > 0)
696 #if defined(SERVER_MODE) 709 const char *hostname;
711 bool should_conn_reset =
false;
719 should_conn_reset =
true;
721 "xtran_should_connection_reset: (has_updated && to-be-standby && normal client)" 722 " DB_CONNECTION_STATUS_RESET\n");
729 thread_p->conn_entry->reset_on_commit =
false;
733 should_conn_reset =
true;
735 "xtran_should_connection_reset: (standby && read-write broker) DB_CONNECTION_STATUS_RESET\n");
739 should_conn_reset =
true;
740 thread_p->conn_entry->reset_on_commit =
false;
742 "xtran_should_connection_reset: (standby && conn->reset_on_commit && normal client)" 743 " DB_CONNECTION_STATUS_RESET\n");
747 if (thread_p->conn_entry->ignore_repl_delay ==
false)
749 should_conn_reset =
true;
751 "xtran_should_connection_reset: (standby && replication delay && broker and default client)" 752 " DB_CONNECTION_STATUS_RESET\n");
754 thread_p->conn_entry->reset_on_commit =
false;
759 should_conn_reset =
true;
761 "xtran_should_connection_reset: (active && slave only broker) DB_CONNECTION_STATUS_RESET\n");
766 should_conn_reset =
true;
768 "xtran_should_connection_reset: (maintenance && remote normal client type)" 769 " DB_CONNECTION_STATUS_RESET\n");
772 return should_conn_reset;
bool lock_has_xlock(THREAD_ENTRY *thread_p)
TRANID logtb_find_current_tranid(THREAD_ENTRY *thread_p)
void tx_lob_locator_clear(cubthread::entry *thread_p, log_tdes *tdes, bool at_commit, LOG_LSA *savept_lsa)
#define ER_LK_UNILATERALLY_ABORTED
cubthread::entry * thread_get_thread_entry_info(void)
int locator_drop_transient_class_name_entries(THREAD_ENTRY *thread_p, LOG_LSA *savep_lsa)
TRAN_STATE log_abort(THREAD_ENTRY *thread_p, int tran_index)
size_t css_count_transaction_worker_threads(THREAD_ENTRY *thread_p, int tran_index, int client_id)
void LSA_COPY(log_lsa *plsa1, const log_lsa *plsa2)
#define BOOT_CSQL_CLIENT_TYPE(client_type)
int xtran_server_2pc_recovery_prepared(THREAD_ENTRY *thread_p, int gtrids[], int size)
#define BOOT_BROKER_AND_DEFAULT_CLIENT_TYPE(client_type)
TRAN_STATE log_2pc_prepare(THREAD_ENTRY *thread_p)
int logtb_find_current_client_type(THREAD_ENTRY *thread_p)
bool logtb_set_tran_index_interrupt(THREAD_ENTRY *thread_p, int tran_index, bool set)
void thread_sleep(double millisec)
#define assert_release(e)
const char * logtb_find_current_client_hostname(THREAD_ENTRY *thread_p)
int xtran_server_2pc_attach_global_tran(THREAD_ENTRY *thread_p, int gtrid)
void log_sysop_start(THREAD_ENTRY *thread_p)
int lock_rep_read_tran(THREAD_ENTRY *thread_p, LOCK lock, int cond_flag)
TRAN_STATE xtran_server_2pc_prepare_global_tran(THREAD_ENTRY *thread_p, int global_tranid)
bool xtran_should_connection_reset(THREAD_ENTRY *thread_p, bool has_updated)
TRAN_STATE xtran_server_commit(THREAD_ENTRY *thread_p, bool retain_lock)
int log_2pc_attach_global_tran(THREAD_ENTRY *thread_p, int gtrid)
#define er_log_debug(...)
char boot_Host_name[CUB_MAXHOSTNAMELEN]
int log_2pc_set_global_tran_info(THREAD_ENTRY *thread_p, int gtrid, void *info, int size)
int xtran_server_savepoint(THREAD_ENTRY *thread_p, const char *savept_name, LOG_LSA *savept_lsa)
void er_set(int severity, const char *file_name, const int line_no, int err_id, int num_args,...)
#define BOOT_NORMAL_CLIENT_TYPE(client_type)
#define BOOT_IS_ALLOWED_CLIENT_TYPE_IN_MT_MODE(host1, host2, client_type)
int xtran_wait_server_active_trans(THREAD_ENTRY *thread_p)
bool logtb_is_interrupted_tran(THREAD_ENTRY *thread_p, bool clear, bool *continue_checking, int tran_index)
int xtran_server_2pc_start(THREAD_ENTRY *thread_p)
bool logtb_is_current_active(THREAD_ENTRY *thread_p)
bool logtb_has_updated(THREAD_ENTRY *thread_p)
int log_2pc_start(THREAD_ENTRY *thread_p)
TRAN_STATE log_abort_partial(THREAD_ENTRY *thread_p, const char *savepoint_name, LOG_LSA *savept_lsa)
int xtran_lock_rep_read(THREAD_ENTRY *thread_p, LOCK lock_rr_tran)
LOG_LSA * log_get_parent_lsa_system_op(THREAD_ENTRY *thread_p, LOG_LSA *parent_lsa)
bool xtran_server_has_updated(THREAD_ENTRY *thread_p)
#define LOG_SET_CURRENT_TRAN_INDEX(thrd, index)
#define ER_LOG_UNKNOWN_TRANINDEX
TRAN_STATE xtran_server_partial_abort(THREAD_ENTRY *thread_p, const char *savept_name, LOG_LSA *savept_lsa)
void log_sysop_abort(THREAD_ENTRY *thread_p)
LOG_TDES * LOG_FIND_CURRENT_TDES(THREAD_ENTRY *thread_p=NULL)
#define LOG_FIND_THREAD_TRAN_INDEX(thrd)
TRAN_STATE xtran_server_end_topop(THREAD_ENTRY *thread_p, LOG_RESULT_TOPOP result, LOG_LSA *topop_lsa)
TRAN_STATE tran_server_unilaterally_abort_tran(THREAD_ENTRY *thread_p)
int xtran_server_is_active_and_has_updated(THREAD_ENTRY *thread_p)
int xtran_server_start_topop(THREAD_ENTRY *thread_p, LOG_LSA *topop_lsa)
void LSA_SET_NULL(log_lsa *lsa_ptr)
int xtran_server_get_global_tran_info(THREAD_ENTRY *thread_p, int gtrid, void *buffer, int size)
bool css_is_ha_repl_delayed(void)
int logtb_find_client_name_host_pid(int tran_index, const char **client_prog_name, const char **client_user_name, const char **client_host_name, int *client_pid)
HA_SERVER_STATE css_ha_server_state(void)
int log_2pc_recovery_prepared(THREAD_ENTRY *thread_p, int gtrids[], int size)
void log_sysop_attach_to_outer(THREAD_ENTRY *thread_p)
void log_sysop_commit(THREAD_ENTRY *thread_p)
TRAN_STATE xtran_server_2pc_prepare(THREAD_ENTRY *thread_p)
int locator_savepoint_transient_class_name_entries(THREAD_ENTRY *thread_p, LOG_LSA *savep_lsa)
int xtran_server_set_global_tran_info(THREAD_ENTRY *thread_p, int gtrid, void *info, int size)
int db_make_int(DB_VALUE *value, const int num)
enum ha_server_state HA_SERVER_STATE
TRAN_STATE log_commit(THREAD_ENTRY *thread_p, int tran_index, bool retain_lock)
LOG_LSA * log_append_savepoint(THREAD_ENTRY *thread_p, const char *savept_name)
TRAN_STATE xtran_server_abort(THREAD_ENTRY *thread_p)
TRAN_STATE log_2pc_prepare_global_tran(THREAD_ENTRY *thread_p, int gtrid)
bool xtran_is_blocked(THREAD_ENTRY *thread_p, int tran_index)
bool lock_is_waiting_transaction(int tran_index)
int xtran_get_local_transaction_id(THREAD_ENTRY *thread_p, DB_VALUE *trid)
int log_2pc_get_global_tran_info(THREAD_ENTRY *thread_p, int gtrid, void *buffer, int size)
int db_value_domain_init(DB_VALUE *value, const DB_TYPE type, const int precision, const int scale)