summaryrefslogtreecommitdiff
path: root/sql/rpl_rli.h
diff options
context:
space:
mode:
authorunknown <knielsen@knielsen-hq.org>2013-07-08 16:47:07 +0200
committerunknown <knielsen@knielsen-hq.org>2013-07-08 16:47:07 +0200
commita99356fbe72fbca61617edabc5a8928da4343c96 (patch)
treed685addaf9908478c735a57d271d937b7133c60f /sql/rpl_rli.h
parente654be3865d7c8a6ad6339b2de2c45f02c9f7981 (diff)
downloadmariadb-git-a99356fbe72fbca61617edabc5a8928da4343c96.tar.gz
MDEV-4506: Parallel replication: intermediate commit.
Fix a bunch of issues found with locking, ordering, and non-thread-safe stuff in Relay_log_info. Now able to do a simple benchmark, showing 4.5 times speedup for applying a binlog with 10000 REPLACE statements.
Diffstat (limited to 'sql/rpl_rli.h')
-rw-r--r--sql/rpl_rli.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/sql/rpl_rli.h b/sql/rpl_rli.h
index c22773f9810..294f2ba885a 100644
--- a/sql/rpl_rli.h
+++ b/sql/rpl_rli.h
@@ -604,6 +604,7 @@ private:
struct rpl_group_info
{
Relay_log_info *rli;
+ THD *thd;
/*
Current GTID being processed.
The sub_id gives the binlog order within one domain_id. A zero sub_id
@@ -630,10 +631,19 @@ struct rpl_group_info
*/
uint64 wait_commit_sub_id;
struct rpl_group_info *wait_commit_group_info;
+ /*
+ If non-zero, the event group must wait for this sub_id to be committed
+ before the execution of the event group is allowed to start.
+
+ (When we execute in parallel the transactions that group committed
+ together on the master, we still need to wait for any prior transactions
+ to have commtted).
+ */
+ uint64 wait_start_sub_id;
struct rpl_parallel_entry *parallel_entry;
- rpl_group_info(Relay_log_info *rli);
+ rpl_group_info(Relay_log_info *rli_);
~rpl_group_info() { };
};