diff options
author | Teemu Ollakka <teemu.ollakka@galeracluster.com> | 2019-02-19 14:08:29 +0200 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2019-02-25 08:31:52 +0200 |
commit | 6edfeb82fdf95f753b1ee4a1858ddc7740eaaab1 (patch) | |
tree | a3b1c58a0703c87e92bf0eb8cd246e66f5b19450 /sql/service_wsrep.cc | |
parent | 31b65d3dd211826b194a9a2e6894816ccd05b707 (diff) | |
download | mariadb-git-6edfeb82fdf95f753b1ee4a1858ddc7740eaaab1.tar.gz |
Fixes to streaming replication BF aborts
The InnoDB DeadlockChecker::check_and_resolve() was missing a
call to wsrep_handle_SR_rollback() in the case when the
transaction running deadlock detection was chosen as victim.
Refined wsrep_handle_SR_rollback() to skip store_globals() calls
if the transaction was BF aborting itself.
Made mysql-wsrep-features#165 more deterministic by waiting until
the update is in progress before sending next update.
Diffstat (limited to 'sql/service_wsrep.cc')
-rw-r--r-- | sql/service_wsrep.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sql/service_wsrep.cc b/sql/service_wsrep.cc index f4cf49b9b84..6d76cccccee 100644 --- a/sql/service_wsrep.cc +++ b/sql/service_wsrep.cc @@ -145,8 +145,11 @@ extern "C" void wsrep_handle_SR_rollback(THD *bf_thd, victim_thd->wsrep_trx_id(), victim_thd->wsrep_sr().fragments_certified(), wsrep_thd_transaction_state_str(victim_thd)); - if (bf_thd) victim_thd->store_globals(); - if (!bf_thd) + if (bf_thd && bf_thd != victim_thd) + { + victim_thd->store_globals(); + } + else { DEBUG_SYNC(victim_thd, "wsrep_before_SR_rollback"); } @@ -158,7 +161,10 @@ extern "C" void wsrep_handle_SR_rollback(THD *bf_thd, { wsrep_thd_self_abort(victim_thd); } - if (bf_thd) bf_thd->store_globals(); + if (bf_thd && bf_thd != victim_thd) + { + bf_thd->store_globals(); + } } extern "C" my_bool wsrep_thd_bf_abort(const THD *bf_thd, THD *victim_thd, |