summaryrefslogtreecommitdiff
path: root/sql/mysqld.h
diff options
context:
space:
mode:
authorunknown <knielsen@knielsen-hq.org>2013-06-26 12:10:35 +0200
committerunknown <knielsen@knielsen-hq.org>2013-06-26 12:10:35 +0200
commit7e5dc4f074b7d1cee4721e6fa49d6e5628ef793f (patch)
tree1df1473973c1cb97d8d1a4f0a25028d3b74c39cb /sql/mysqld.h
parent535de71728ff92747b46e985b339d23b4587a9c4 (diff)
downloadmariadb-git-7e5dc4f074b7d1cee4721e6fa49d6e5628ef793f.tar.gz
MDEV-4506: Parallel replication. Intermediate commit.
Implement facility for the commit in one thread to wait for the commit of another to complete first. The wait is done in a way that does not hinder that a waiter and a waitee can group commit together with a single fsync() in both binlog and InnoDB. The wait is done efficiently with respect to locking. The patch was originally made to support TaoBao parallel replication with in-order commit; now it will be adapted to also be used for parallel replication of group-committed transactions. A waiter THD registers itself with a prior waitee THD. The waiter will then complete its commit at the earliest in the same group commit of the waitee (when using binlog). The wait can also be done explicitly by the waitee.
Diffstat (limited to 'sql/mysqld.h')
-rw-r--r--sql/mysqld.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/mysqld.h b/sql/mysqld.h
index ff2dfffa991..ed6d05807b0 100644
--- a/sql/mysqld.h
+++ b/sql/mysqld.h
@@ -253,7 +253,7 @@ extern PSI_mutex_key key_LOCK_slave_state, key_LOCK_binlog_state,
extern PSI_mutex_key key_LOCK_stats,
key_LOCK_global_user_client_stats, key_LOCK_global_table_stats,
- key_LOCK_global_index_stats, key_LOCK_wakeup_ready;
+ key_LOCK_global_index_stats, key_LOCK_wakeup_ready, key_LOCK_wait_commit;
extern PSI_mutex_key key_LOCK_rpl_gtid_state;
@@ -279,7 +279,8 @@ extern PSI_cond_key key_BINLOG_COND_xid_list, key_BINLOG_update_cond,
key_relay_log_info_sleep_cond,
key_TABLE_SHARE_cond, key_user_level_lock_cond,
key_COND_thread_count, key_COND_thread_cache, key_COND_flush_thread_cache;
-extern PSI_cond_key key_RELAYLOG_update_cond, key_COND_wakeup_ready;
+extern PSI_cond_key key_RELAYLOG_update_cond, key_COND_wakeup_ready,
+ key_COND_wait_commit;
extern PSI_cond_key key_RELAYLOG_COND_queue_busy;
extern PSI_cond_key key_TC_LOG_MMAP_COND_queue_busy;
extern PSI_cond_key key_COND_rpl_thread, key_COND_rpl_thread_pool;