diff options
author | Monty <monty@mariadb.org> | 2017-11-07 11:04:45 +0200 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2017-12-03 13:58:35 +0200 |
commit | b016e1ba7f649256c53e9cad3b0c61b76c02fcf1 (patch) | |
tree | 97cdd17b6e3f4cc2225f2578330969641ea1eedd /sql/slave.h | |
parent | 3907ff2d24137dd428e153f6f2b57dd13272a55f (diff) | |
download | mariadb-git-b016e1ba7f649256c53e9cad3b0c61b76c02fcf1.tar.gz |
MDEV-7702 Spiral patch 004_mariadb-10.0.15.slave-trx-retry.diff
This is about adding more options to force slave retries
Two new variables has been added:
slave_transaction_retry_errors
- Tells the slave thread to retry transaction for replication when a
query event returns an error from the provided list. Deadlock and
elapsed lock wait timeout errors are automatically added to this list
slave-transaction-retry-interval
- Interval of the slave SQL thread will retry a transaction
in case it failed with a deadlock or elapsed lock wait
timeout or listed in slave_transaction_retry_errors
Other changes:
- Simplifed code for slave_skip_errors (to be aligned with
slave_transaction_retry_errors)
- Renamed print_slave_skip_errors() to make_slave_skip_errors_printable()
- Remove printing error from init_slave_skip_errors as my_bitmap_init()
will do that if needed.
- Generalize has_temporary_error()
Diffstat (limited to 'sql/slave.h')
-rw-r--r-- | sql/slave.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/slave.h b/sql/slave.h index c856a6989ed..74bb4356dfb 100644 --- a/sql/slave.h +++ b/sql/slave.h @@ -132,6 +132,9 @@ extern ulong master_retry_count; extern MY_BITMAP slave_error_mask; extern char slave_skip_error_names[]; extern bool use_slave_mask; +extern char slave_transaction_retry_error_names[]; +extern uint *slave_transaction_retry_errors; +extern uint slave_transaction_retry_error_length; extern char *slave_load_tmpdir; extern char *master_info_file; extern MYSQL_PLUGIN_IMPORT char *relay_log_info_file; @@ -139,6 +142,7 @@ extern char *opt_relay_logname, *opt_relaylog_index_name; extern my_bool opt_skip_slave_start, opt_reckless_slave; extern my_bool opt_log_slave_updates; extern char *opt_slave_skip_errors; +extern char *opt_slave_transaction_retry_errors; extern my_bool opt_replicate_annotate_row_events; extern ulonglong relay_log_space_limit; extern ulonglong opt_read_binlog_speed_limit; @@ -184,7 +188,8 @@ extern const char *relay_log_basename; int init_slave(); int init_recovery(Master_info* mi, const char** errmsg); -void init_slave_skip_errors(const char* arg); +bool init_slave_skip_errors(const char* arg); +bool init_slave_transaction_retry_errors(const char* arg); int register_slave_on_master(MYSQL* mysql); int terminate_slave_threads(Master_info* mi, int thread_mask, bool skip_lock = 0); |