summaryrefslogtreecommitdiff
path: root/sql/log.h
diff options
context:
space:
mode:
authorAndrei Elkin <andrei.elkin@mariadb.com>2017-11-22 17:10:34 +0200
committerMonty <monty@mariadb.org>2017-12-18 13:43:37 +0200
commite972125f11d8f37bc263b113e85ed064257a92ee (patch)
treef705082eec5bdb4f274b3e7ceee4714b86c96075 /sql/log.h
parentabceaa75428f9b2d64ce64629d010af9aa6eae1f (diff)
downloadmariadb-git-e972125f11d8f37bc263b113e85ed064257a92ee.tar.gz
MDEV-13073 This part merges the Ali semisync related changes
and specifically the ack receiving functionality. Semisync is turned to be static instead of plugin so its functions are invoked at the same points as RUN_HOOKS. The RUN_HOOKS and the observer interface remain to be removed by later patch. Todo: React on killed status by repl_semisync_master.wait_after_sync(). Currently Repl_semi_sync_master::commit_trx does not check the killed status. There were few bugfixes found that are present in mysql and its unclear whether/how they are covered. Those include: Bug#15985893: GTID SKIPPED EVENTS ON MASTER CAUSE SEMI SYNC TIME-OUTS Bug#17932935 CALLING IS_SEMI_SYNC_SLAVE() IN EACH FUNCTION CALL HAS BAD PERFORMANCE Bug#20574628: SEMI-SYNC REPLICATION PERFORMANCE DEGRADES WITH A HIGH NUMBER OF THREADS
Diffstat (limited to 'sql/log.h')
-rw-r--r--sql/log.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/sql/log.h b/sql/log.h
index 0a82f8813f0..02ace7c7921 100644
--- a/sql/log.h
+++ b/sql/log.h
@@ -349,6 +349,11 @@ public:
/* for documentation of mutexes held in various places in code */
};
+/* Tell the io thread if we can delay the master info sync. */
+#define SEMI_SYNC_SLAVE_DELAY_SYNC 1
+/* Tell the io thread if the current event needs a ack. */
+#define SEMI_SYNC_NEED_ACK 2
+
class MYSQL_QUERY_LOG: public MYSQL_LOG
{
public:
@@ -435,6 +440,8 @@ class MYSQL_BIN_LOG: public TC_LOG, private MYSQL_LOG
PSI_file_key m_key_file_log_index;
PSI_file_key m_key_COND_queue_busy;
+ /** The instrumentation key to use for LOCK_binlog_end_pos. */
+ PSI_mutex_key m_key_LOCK_binlog_end_pos;
#endif
struct group_commit_entry
@@ -667,7 +674,8 @@ public:
PSI_cond_key key_bin_log_update,
PSI_file_key key_file_log,
PSI_file_key key_file_log_index,
- PSI_file_key key_COND_queue_busy)
+ PSI_file_key key_COND_queue_busy,
+ PSI_mutex_key key_LOCK_binlog_end_pos)
{
m_key_LOCK_index= key_LOCK_index;
m_key_relay_log_update= key_relay_log_update;
@@ -675,6 +683,7 @@ public:
m_key_file_log= key_file_log;
m_key_file_log_index= key_file_log_index;
m_key_COND_queue_busy= key_COND_queue_busy;
+ m_key_LOCK_binlog_end_pos= key_LOCK_binlog_end_pos;
}
#endif