summaryrefslogtreecommitdiff
path: root/sql/rpl_rli.h
diff options
context:
space:
mode:
authorKristian Nielsen <knielsen@knielsen-hq.org>2014-07-08 12:54:47 +0200
committerKristian Nielsen <knielsen@knielsen-hq.org>2014-07-08 12:54:47 +0200
commit98fc5b3af8b1954e4480ac33d30493aa4de66ec4 (patch)
tree1177381a922f146c32444cc44d5564fbd0f10d8f /sql/rpl_rli.h
parente5149fa0d905c6702bd6dcc64c5e3194b6a630fc (diff)
downloadmariadb-git-98fc5b3af8b1954e4480ac33d30493aa4de66ec4.tar.gz
MDEV-5262, MDEV-5914, MDEV-5941, MDEV-6020: Deadlocks during parallel replication causing replication to fail.
After-review changes. For this patch in 10.0, we do not introduce a new public storage engine API, we just fix the InnoDB/XtraDB issues. In 10.1, we will make a better public API that can be used for all storage engines (MDEV-6429). Eliminate the background thread that did deadlock kills asynchroneously. Instead, we ensure that the InnoDB/XtraDB code can handle doing the kill from inside the deadlock detection code (when thd_report_wait_for() needs to kill a later thread to resolve a deadlock). (We preserve the part of the original patch that introduces dedicated mutex and condition for the slave init thread, to remove the abuse of LOCK_thread_count for start/stop synchronisation of the slave init thread).
Diffstat (limited to 'sql/rpl_rli.h')
-rw-r--r--sql/rpl_rli.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/rpl_rli.h b/sql/rpl_rli.h
index f914451cf96..ce30813790c 100644
--- a/sql/rpl_rli.h
+++ b/sql/rpl_rli.h
@@ -170,6 +170,7 @@ public:
*/
inuse_relaylog *inuse_relaylog_list;
inuse_relaylog *last_inuse_relaylog;
+ /* Lock used to protect inuse_relaylog::dequeued_count */
my_atomic_rwlock_t inuse_relaylog_atomic_lock;
/*
@@ -532,6 +533,7 @@ struct rpl_group_info
*/
uint64 gtid_sub_id;
rpl_gtid current_gtid;
+ uint64 commit_id;
/*
This is used to keep transaction commit order.
We will signal this when we commit, and can register it to wait for the