diff options
author | unknown <knielsen@knielsen-hq.org> | 2013-07-08 16:47:07 +0200 |
---|---|---|
committer | unknown <knielsen@knielsen-hq.org> | 2013-07-08 16:47:07 +0200 |
commit | a99356fbe72fbca61617edabc5a8928da4343c96 (patch) | |
tree | d685addaf9908478c735a57d271d937b7133c60f /sql/rpl_parallel.h | |
parent | e654be3865d7c8a6ad6339b2de2c45f02c9f7981 (diff) | |
download | mariadb-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_parallel.h')
-rw-r--r-- | sql/rpl_parallel.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sql/rpl_parallel.h b/sql/rpl_parallel.h index a84722e9263..304263c3477 100644 --- a/sql/rpl_parallel.h +++ b/sql/rpl_parallel.h @@ -60,6 +60,15 @@ struct rpl_parallel_entry { mysql_cond_t COND_parallel_entry; uint64 current_sub_id; struct rpl_group_info *current_group_info; + /* + The sub_id of the last event group in the previous batch of group-committed + transactions. + + When we spawn parallel worker threads for the next group-committed batch, + they first need to wait for this sub_id to be committed before it is safe + to start executing them. + */ + uint64 prev_groupcommit_sub_id; }; struct rpl_parallel { HASH domain_hash; @@ -69,7 +78,7 @@ struct rpl_parallel { ~rpl_parallel(); rpl_parallel_entry *find(uint32 domain_id); void wait_for_done(); - bool do_event(struct rpl_group_info *serial_rgi, Log_event *ev, THD *thd); + bool do_event(struct rpl_group_info *serial_rgi, Log_event *ev); }; |