24#ifndef SERVER_ONGOING_TRANSACTIONS_HANDLER_INCLUDED
25#define SERVER_ONGOING_TRANSACTIONS_HANDLER_INCLUDED
71 ulong gr_consistency_level, ulong hold_timeout,
73 const THD *thd)
override;
Listener for transaction life cycle events.
Definition: group_transaction_observation_manager.h:33
enum_transaction_origin
Enum for transaction origins.
Definition: group_transaction_observation_manager.h:36
Definition: stage_monitor_handler.h:30
Definition: server_ongoing_transactions_handler.h:32
Plugin_stage_monitor_handler * stage_handler
A stage handler for reporting progress.
Definition: server_ongoing_transactions_handler.h:99
mysql_mutex_t query_wait_lock
The lock for the query wait.
Definition: server_ongoing_transactions_handler.h:93
bool get_server_running_transactions(ulong **ids, ulong *size)
Get the list of running transactions from the server.
Definition: server_ongoing_transactions_handler.cc:57
Server_ongoing_transactions_handler()
Initialize the class and get the server service.
Definition: server_ongoing_transactions_handler.cc:30
~Server_ongoing_transactions_handler() override
Class destructor.
Definition: server_ongoing_transactions_handler.cc:46
bool initialize_server_service(Plugin_stage_monitor_handler *stage_handler)
Fetch the registry and the service for this class.
Definition: server_ongoing_transactions_handler.cc:36
int before_commit(my_thread_id thread_id, Group_transaction_listener::enum_transaction_origin origin) override
Executed before commit.
Definition: server_ongoing_transactions_handler.cc:139
int before_transaction_begin(my_thread_id thread_id, ulong gr_consistency_level, ulong hold_timeout, enum_rpl_channel_type rpl_channel_type, const THD *thd) override
Executed before a transaction begins.
Definition: server_ongoing_transactions_handler.cc:134
std::queue< my_thread_id > thread_ids_finished
The transactions that finished while the service is running.
Definition: server_ongoing_transactions_handler.h:90
void abort_waiting_process()
Abort any running waiting process.
int after_rollback(my_thread_id thread_id) override
Executed after rollback.
Definition: server_ongoing_transactions_handler.cc:150
my_h_service generic_service
The server service handle.
Definition: server_ongoing_transactions_handler.h:96
int wait_for_current_transaction_load_execution(bool *abort_flag, my_thread_id id_to_ignore=0)
Gets running transactions and waits for its end.
Definition: server_ongoing_transactions_handler.cc:71
int after_commit(my_thread_id thread_id, rpl_sidno sidno, rpl_gno gno) override
Executed after commit.
Definition: server_ongoing_transactions_handler.cc:157
int before_rollback(my_thread_id thread_id, Group_transaction_listener::enum_transaction_origin origin) override
Executed before rollback.
Definition: server_ongoing_transactions_handler.cc:144
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
struct my_h_service_imp * my_h_service
A handle type for acquired Service.
Definition: registry.h:33
static my_thread_id thread_id
Definition: my_thr_init.cc:63
uint32 my_thread_id
Definition: my_thread_local.h:34
size_t size(const char *const c)
Definition: base64.h:46
enum_rpl_channel_type
Type of replication channel thread/transaction might be associated to.
Definition: rpl_context.h:50
mysql::gtid::gno_t rpl_gno
GNO, the second (numeric) component of a GTID, is an alias of mysql::gtid::gno_t.
Definition: rpl_gtid.h:112
cs::index::rpl_sidno rpl_sidno
Type of SIDNO (source ID number, first component of GTID)
Definition: rpl_gtid.h:108
An instrumented mutex structure.
Definition: mysql_mutex_bits.h:50