|
| Slave_worker (Relay_log_info *rli, PSI_mutex_key *param_key_info_run_lock, PSI_mutex_key *param_key_info_data_lock, PSI_mutex_key *param_key_info_sleep_lock, PSI_mutex_key *param_key_info_thd_lock, PSI_mutex_key *param_key_info_data_cond, PSI_mutex_key *param_key_info_start_cond, PSI_mutex_key *param_key_info_stop_cond, PSI_mutex_key *param_key_info_sleep_cond, uint param_id, const char *param_channel) |
|
| ~Slave_worker () override |
|
void | set_worker_metric_collection_status (bool status) |
| Sets the metric collection as on or off This should be done at the worker start. More...
|
|
cs::apply::instruments::Worker_metrics & | get_worker_metrics () |
| gets a reference to the worker statistics. More...
|
|
void | copy_worker_metrics (Slave_worker *other) |
| Copies data and sets the metric collection flag. More...
|
|
void | increment_worker_metrics_for_event (const Log_event &event) |
| Update per-event worker metrics. More...
|
|
void | copy_values_for_PFS (ulong worker_id, en_running_state running_status, THD *worker_thd, const Error &last_error, Gtid_monitoring_info *monitoring_info_arg) |
|
int | init_worker (Relay_log_info *, ulong) |
| Method is executed by Coordinator at Worker startup time to initialize members parly with values supplied by Coordinator through rli. More...
|
|
int | rli_init_info (bool) |
| A part of Slave worker initializer that provides a minimum context for MTS recovery. More...
|
|
int | flush_info (bool force=false) |
|
void | slave_worker_ends_group (Log_event *, int) |
| Deallocation routine to cancel out few effects of map_db_to_worker() . More...
|
|
const char * | get_master_log_name () |
|
ulonglong | get_master_log_pos () |
|
ulonglong | set_master_log_pos (ulong val) |
|
bool | commit_positions (Log_event *evt, Slave_job_group *ptr_g, bool force) |
|
bool | commit_positions () override |
| The method is a wrapper to provide uniform interface with STS and is to be called from Relay_log_info and Slave_worker pre_commit() methods. More...
|
|
void | post_commit (bool on_rollback) override |
| See the comments for STS version of this method. More...
|
|
void | rollback_positions (Slave_job_group *ptr_g) |
|
bool | reset_recovery_info () |
| Clean up a part of Worker info table that is regarded in in gaps collecting at recovery. More...
|
|
int | set_rli_description_event (Format_description_log_event *fdle) override |
| The method runs at Worker initialization, at runtime when Coordinator supplied a new FD event for execution context, and at the Worker pool shutdown. More...
|
|
void | reset_gaq_index () |
|
void | set_gaq_index (ulong val) |
|
int | slave_worker_exec_event (Log_event *ev) |
| MTS worker main routine. More...
|
|
void | prepare_for_retry (Log_event &event) |
| Make the necessary changes to both the Slave_worker and current Log_event objects, before retrying to apply the transaction. More...
|
|
std::tuple< bool, bool, uint > | check_and_report_end_of_retries (THD *thd) |
| Checks if the transaction can be retried, and if not, reports an error. More...
|
|
bool | retry_transaction (my_off_t start_relay_pos, const char *start_event_relay_log_name, my_off_t end_relay_pos, const char *end_event_relay_log_name) |
| It is called after an error happens. More...
|
|
bool | set_info_search_keys (Rpl_info_handler *to) override |
| To search in the slave repositories, each slave info object (mi, rli or worker) should use a primary key. More...
|
|
Relay_log_info * | get_c_rli () override |
| Get coordinator's RLI. More...
|
|
const char * | get_for_channel_str (bool upper_case=false) const override |
| return an extension "for channel channel_name" for error messages per channel More...
|
|
longlong | sequence_number () |
|
bool | found_commit_order_deadlock () |
| Return true if replica-preserve-commit-order is enabled and an earlier transaction is waiting for a row-level lock held by this transaction. More...
|
|
void | report_commit_order_deadlock () |
| Called when replica-preserve-commit-order is enabled, by the worker processing an earlier transaction that waits on a row-level lock held by this worker's transaction. More...
|
|
ulong | get_master_server_version () |
|
void | reset_commit_order_deadlock () |
| Set the flag the signals a deadlock to false. More...
|
|
bool | belongs_to_client () |
|
Gtid_monitoring_info * | get_gtid_monitoring_info () |
|
void | started_processing (Gtid gtid_arg, ulonglong original_ts_arg, ulonglong immediate_ts_arg, bool skipped=false) |
| Stores the details of the transaction which has just started processing. More...
|
|
void | started_processing (Gtid_log_event *gtid_log_ev_arg) |
| Stores the details of the transaction which has just started processing. More...
|
|
void | finished_processing () |
| When the processing of a transaction is completed, that timestamp is recorded, the information is copied to last_processed_trx and the information in processing_trx is cleared. More...
|
|
bool | is_processing_trx () |
|
void | clear_processing_trx () |
| Clears the processing_trx structure fields. More...
|
|
void | clear_gtid_monitoring_info () |
| Clears the Gtid_monitoring_info fields. More...
|
|
void | retried_processing (uint transient_errno_arg, const char *transient_err_message_arg, ulong trans_retries_arg) |
| When a transaction is retried, the error number and message, and total number of retries are stored. More...
|
|
std::string | get_privilege_checks_username () const |
| Retrieves the username part of the PRIVILEGE_CHECKS_USER option of CHANGE MASTER TO statement. More...
|
|
std::string | get_privilege_checks_hostname () const |
| Retrieves the host part of the PRIVILEGE_CHECKS_USER option of CHANGE MASTER TO statement. More...
|
|
bool | is_privilege_checks_user_null () const |
| Returns whether or not there is no user configured for PRIVILEGE_CHECKS_USER . More...
|
|
bool | is_privilege_checks_user_corrupted () const |
| Returns whether or not the internal data regarding PRIVILEGE_CHECKS_USER is corrupted. More...
|
|
void | clear_privilege_checks_user () |
| Clears the info related to the data initialized from PRIVILEGE_CHECKS_USER . More...
|
|
void | set_privilege_checks_user_corrupted (bool is_corrupted) |
| Sets the flag that tells whether or not the data regarding the PRIVILEGE_CHECKS_USER is corrupted. More...
|
|
enum_priv_checks_status | set_privilege_checks_user (char const *param_privilege_checks_username, char const *param_privilege_checks_hostname) |
| Initializes data related to PRIVILEGE_CHECKS_USER , specifically the user name and the user hostname. More...
|
|
enum_priv_checks_status | check_privilege_checks_user () |
| Checks the validity and integrity of the data related to PRIVILEGE_CHECKS_USER , specifically the user name and the user hostname. More...
|
|
enum_priv_checks_status | check_privilege_checks_user (char const *param_privilege_checks_username, char const *param_privilege_checks_hostname) |
| Checks the validity and integrity of the data related to PRIVILEGE_CHECKS_USER , specifically the user name and the user hostname. More...
|
|
enum_priv_checks_status | check_applier_acl_user (char const *param_privilege_checks_username, char const *param_privilege_checks_hostname) |
| Checks the existence of user provided as part of the PRIVILEGE_CHECKS_USER option. More...
|
|
std::pair< const char *, const char * > | print_applier_security_context_user_host () const |
| Returns a printable representation of the username and hostname currently being used in the applier security context or empty strings other wise. More...
|
|
void | report_privilege_check_error (enum loglevel level, enum_priv_checks_status status_code, bool to_client, char const *channel_name=nullptr, char const *user_name=nullptr, char const *host_name=nullptr) const |
| Outputs the error message associated with applier thread user privilege checks error error_code . More...
|
|
enum_priv_checks_status | initialize_security_context (THD *thd) |
| Initializes the security context associated with the PRIVILEGE_CHECKS_USER user that is to be used by the provided THD object. More...
|
|
enum_priv_checks_status | initialize_applier_security_context () |
| Initializes the security context associated with the PRIVILEGE_CHECKS_USER user that is to be used by the applier thread. More...
|
|
bool | is_row_format_required () const |
| Returns whether the slave is running in row mode only. More...
|
|
void | set_require_row_format (bool require_row) |
| Sets the flag that tells whether or not the slave is running in row mode only. More...
|
|
enum_require_table_primary_key | get_require_table_primary_key_check () const |
| Returns what is the slave policy concerning primary keys on replicated tables. More...
|
|
void | set_require_table_primary_key_check (enum_require_table_primary_key require_pk) |
| Sets the field that tells what is the slave policy concerning primary keys on replicated tables. More...
|
|
void | set_applier_source_position_info_invalid (bool invalid) |
| Marks the applier position information as being invalid or not. More...
|
|
bool | is_applier_source_position_info_invalid () const |
| Returns if the applier positions are marked as being invalid or not. More...
|
|
void | set_group_source_log_start_end_pos (const Log_event *ev) |
| Process an event and based on its type () set group beginning and end. More...
|
|
std::tuple< ulonglong, ulonglong > | get_group_source_log_start_end_pos () const |
| Get event group positions in source binary log on a replica which is processed by a worker in MTA or coordinator in STA. More...
|
|
bool | is_relay_log_truncated () |
|
Tsid_map * | get_tsid_map () |
|
Checkable_rwlock * | get_tsid_lock () |
|
void | add_logged_gtid (rpl_sidno sidno, rpl_gno gno) |
|
enum_return_status | add_gtid_set (const Gtid_set *gtid_set) |
| Adds a GTID set to received GTID set. More...
|
|
const Gtid_set * | get_gtid_set () const |
|
bool | reinit_sql_thread_io_cache (const char *log, bool need_data_lock) |
|
bool | is_group_relay_log_name_invalid (const char **errmsg) |
| Check if group_relay_log_name is in index file. More...
|
|
bool | reset_group_relay_log_pos (const char **errmsg) |
| Reset group_relay_log_name and group_relay_log_pos to the start of the first relay log file. More...
|
|
void | fill_coord_err_buf (loglevel level, int err_code, const char *buff_coord) const |
| Update the error number, message and timestamp fields. More...
|
|
void | clear_sql_delay () |
| Reset the delay. More...
|
|
void | notify_relay_log_change () |
| Invalidates cached until_log_name and event_relay_log_name comparison result. More...
|
|
void | notify_relay_log_truncated () |
| Receiver thread notifies that it truncated some data from relay log. More...
|
|
void | clear_relay_log_truncated () |
| Applier clears the flag after it handled the situation. More...
|
|
void | notify_group_master_log_name_update () |
| The same as notify_group_relay_log_name_update but for group_master_log_name . More...
|
|
void | inc_event_relay_log_pos () |
|
int | inc_group_relay_log_pos (ulonglong log_pos, bool need_data_lock, bool force=false) |
| Last executed event group coordinates are updated and optionally forcibly flushed to a repository. More...
|
|
int | wait_for_pos (THD *thd, String *log_name, longlong log_pos, double timeout) |
| Waits until the SQL thread reaches (has executed up to) the log/position or timed out. More...
|
|
int | wait_for_gtid_set (THD *thd, const char *gtid, double timeout, bool update_THD_status=true) |
| Wait for a GTID set to be executed. More...
|
|
int | wait_for_gtid_set (THD *thd, String *gtid, double timeout, bool update_THD_status=true) |
| Wait for a GTID set to be executed. More...
|
|
int | wait_for_gtid_set (THD *thd, const Gtid_set *wait_gtid_set, double timeout, bool update_THD_status=true) |
| Wait for a GTID set to be executed. More...
|
|
void | close_temporary_tables () |
|
bool | get_table_data (TABLE *table_arg, table_def **tabledef_var, TABLE **conv_table_var) const |
|
void | cached_charset_invalidate () |
| Last charset (6 bytes) seen by slave SQL thread is cached here; it helps the thread save 3 get_charset() per Query_log_event if the charset is not changing from event to event (common situation). More...
|
|
bool | cached_charset_compare (char *charset) const |
|
void | cleanup_context (THD *, bool) |
|
void | slave_close_thread_tables (THD *) |
|
void | clear_tables_to_lock () |
|
int | purge_relay_logs (THD *thd, const char **errmsg, bool delete_only=false) |
| Purges relay logs. More...
|
|
cs::apply::instruments::Applier_metrics_interface & | get_applier_metrics () |
| Returns the replication applier metrics aggregator. More...
|
|
size_t | get_worker_count () |
|
Slave_worker * | get_worker (size_t n) |
|
void | init_workers (ulong) |
| The method to invoke at slave threads start. More...
|
|
void | deinit_workers () |
| The method to invoke at slave threads stop. More...
|
|
bool | is_mts_recovery () const |
| returns true if there is any gap-group of events to execute at slave starting phase. More...
|
|
void | clear_mts_recovery_groups () |
|
bool | is_parallel_exec () const |
| returns true if events are to be executed in parallel More...
|
|
bool | is_mts_in_group () |
| returns true if Coordinator is scheduling events belonging to the same group and has not reached yet its terminal event. More...
|
|
bool | is_time_for_mta_checkpoint () |
| Check if it is time to compute MTS checkpoint. More...
|
|
void | reset_notified_relay_log_change () |
| While a group is executed by a Worker the relay log can change. More...
|
|
void | reset_notified_checkpoint (ulong count, time_t new_ts, bool update_timestamp=false) |
| While a group is executed by a Worker the relay log can change. More...
|
|
bool | mts_finalize_recovery () |
| Called when gaps execution is ended so it is crash-safe to reset the last session Workers info. More...
|
|
void | cleanup_after_query () |
|
void | cleanup_after_session () |
|
int | stmt_done (my_off_t event_log_pos) |
| Helper function to do after statement completion. More...
|
|
void | set_flag (enum_state_flag flag) |
| Set the value of a replication state flag. More...
|
|
bool | get_flag (enum_state_flag flag) |
| Get the value of a replication state flag. More...
|
|
void | clear_flag (enum_state_flag flag) |
| Clear the value of a replication state flag. More...
|
|
bool | is_in_group () const |
| A group is defined as the entire range of events that constitute a transaction or auto-committed statement. More...
|
|
int | count_relay_log_space () |
|
int | rli_init_info (bool skip_received_gtid_set_and_relaylog_recovery=false) |
| Initialize the relay log info. More...
|
|
void | end_info () |
|
int | flush_info (const int flush_flags) |
| Stores the file and position where the execute-slave thread are in the relay log: More...
|
|
bool | clear_info () |
| Clears from this Relay_log_info object all attribute values that are not to be kept. More...
|
|
enum_return_check | check_if_info_was_cleared (const enum_return_check &previous_result) const |
| Checks if the underlying Rpl_info handler holds information for the fields to be kept between slave resets, while the other fields were cleared. More...
|
|
int | flush_current_log () |
|
void | set_master_info (Master_info *info) |
|
ulonglong | get_future_event_relay_log_pos () |
|
void | set_future_event_relay_log_pos (ulonglong log_pos) |
|
const char * | get_group_master_log_name () const |
|
const char * | get_group_master_log_name_info () const |
|
ulonglong | get_group_master_log_pos () const |
|
ulonglong | get_group_master_log_pos_info () const |
|
void | set_group_master_log_name (const char *log_file_name) |
|
void | set_group_master_log_pos (ulonglong log_pos) |
|
const char * | get_group_relay_log_name () |
|
ulonglong | get_group_relay_log_pos () |
|
void | set_group_relay_log_name (const char *log_file_name) |
|
void | set_group_relay_log_name (const char *log_file_name, size_t len) |
|
void | set_group_relay_log_pos (ulonglong log_pos) |
|
const char * | get_event_relay_log_name () |
|
ulonglong | get_event_relay_log_pos () |
|
void | set_event_relay_log_name (const char *log_file_name) |
|
void | set_event_start_pos (my_off_t pos) |
|
my_off_t | get_event_start_pos () |
|
void | set_event_relay_log_pos (ulonglong log_pos) |
|
const char * | get_rpl_log_name () const |
|
void | start_sql_delay (time_t delay_end) |
| Indicate that a delay starts. More...
|
|
time_t | get_sql_delay () |
|
void | set_sql_delay (time_t _sql_delay) |
|
time_t | get_sql_delay_end () |
|
| Relay_log_info (bool is_slave_recovery, PSI_mutex_key *param_key_info_run_lock, PSI_mutex_key *param_key_info_data_lock, PSI_mutex_key *param_key_info_sleep_lock, PSI_mutex_key *param_key_info_thd_lock, PSI_mutex_key *param_key_info_data_cond, PSI_mutex_key *param_key_info_start_cond, PSI_mutex_key *param_key_info_stop_cond, PSI_mutex_key *param_key_info_sleep_cond, uint param_id, const char *param_channel, bool is_rli_fake) |
|
| ~Relay_log_info () override |
|
time_t | get_row_stmt_start_timestamp () |
|
time_t | set_row_stmt_start_timestamp () |
|
void | reset_row_stmt_start_timestamp () |
|
void | set_long_find_row_note_printed () |
|
void | unset_long_find_row_note_printed () |
|
bool | is_long_find_row_note_printed () |
|
Format_description_log_event * | get_rli_description_event () const |
| Return the current Format_description_log_event. More...
|
|
ulong | adapt_to_master_version (Format_description_log_event *fdle) |
| adaptation for the slave applier to specific master versions. More...
|
|
ulong | adapt_to_master_version_updown (ulong master_version, ulong current_version) |
| The method compares two supplied versions and carries out down- or up- grade customization of execution context of the slave applier (thd). More...
|
|
Commit_order_manager * | get_commit_order_manager () |
|
void | set_commit_order_manager (Commit_order_manager *mngr) |
|
void | set_until_option (Until_option *option) |
|
void | clear_until_option () |
|
void | set_filter (Rpl_filter *channel_filter) |
| Set replication filter for the channel. More...
|
|
void | set_thd_tx_priority (int priority) |
|
int | get_thd_tx_priority () |
|
void | set_ignore_write_set_memory_limit (bool ignore_limit) |
|
bool | get_ignore_write_set_memory_limit () |
|
void | set_allow_drop_write_set (bool does_not_require_ws) |
|
bool | get_allow_drop_write_set () |
|
const char * | get_until_log_name () |
|
my_off_t | get_until_log_pos () |
|
bool | is_until_satisfied_at_start_slave () |
|
bool | is_until_satisfied_before_dispatching_event (const Log_event *ev) |
|
bool | is_until_satisfied_after_dispatching_event () |
|
bool | is_until_satisfied_all_transactions_read_from_relay_log () |
|
int | init_until_option (THD *thd, const LEX_SOURCE_INFO *master_param) |
| Initialize until option object when starting slave. More...
|
|
void | detach_engine_ha_data (THD *thd) |
| Detaches the engine ha_data from THD. More...
|
|
void | reattach_engine_ha_data (THD *thd) |
| Reattaches the engine ha_data to THD. More...
|
|
bool | is_engine_ha_data_detached () |
| Checks whether engine ha data is detached from THD. More...
|
|
void | post_rollback () |
| Execute actions at replicated atomic DLL post rollback time. More...
|
|
bool | pre_commit () |
| The method implements a pre-commit hook to add up a new statement typically to a DDL transaction to update the slave info table. More...
|
|
| ~Rpl_info () override |
|
void | set_rpl_info_handler (Rpl_info_handler *param_handler) |
| Sets the persistency component/handler. More...
|
|
Rpl_info_handler * | get_rpl_info_handler () |
| Gets the persistency component/handler. More...
|
|
enum_return_check | check_info () const |
|
int | remove_info () |
|
int | clean_info () |
|
bool | is_transactional () const |
|
bool | update_is_transactional () |
|
char * | get_description_info () const |
|
bool | copy_info (Rpl_info_handler *from, Rpl_info_handler *to) |
|
uint | get_internal_id () const |
|
char * | get_channel () const |
|
| Slave_reporting_capability (char const *thread_name) |
| Constructor. More...
|
|
virtual void | report (loglevel level, int err_code, const char *msg,...) const |
| Writes a message and, if it's an error message, to Last_Error (which will be displayed by SHOW REPLICA STATUS). More...
|
|
virtual void | report (loglevel level, int err_code, const Gtid_specification *gtid_next, const char *msg,...) const |
|
void | va_report (loglevel level, int err_code, const char *prefix_msg, const char *msg, va_list v_args) const |
|
void | clear_error () |
| Clear errors. More...
|
|
int | has_temporary_error (THD *thd, uint error_arg=0, bool *silent=nullptr) const |
| Check if the current error is of temporary nature or not. More...
|
|
Error const & | last_error () const |
|
bool | is_error () const |
|
virtual | ~Slave_reporting_capability ()=0 |
|