1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Changed from using LOCK_log to LOCK_binlog_end_pos for binary log

Part of MDEV-13073 AliSQL Optimize performance of semisync

The idea it to use a dedicated lock detecting if there is new data in
the master's binary log instead of the overused LOCK_log.

Changes:
- Use dedicated COND variables for the relay and binary log signaling.
  This was needed as we where the old 'update_cond' variable was used
  with different mutex's, which could cause deadlocks.
   - Relay log uses now COND_relay_log_updated and LOCK_log
   - Binary log uses now COND_bin_log_updated and LOCK_binlog_end_pos
- Renamed signal_cnt to relay_signal_cnt (as we now have two signals)
- Added some missing error handling in MYSQL_BIN_LOG::new_file_impl()
- Reformatted some comments with old style
- Renamed m_key_LOCK_binlog_end_pos to key_LOCK_binlog_end_pos
- Changed 'signal_update()' to update_binlog_end_pos() which works for
  both relay and binary log
This commit is contained in:
Monty
2017-10-26 17:20:20 +03:00
parent ea37c129f9
commit 13770edbcb
9 changed files with 158 additions and 83 deletions

View File

@ -2437,7 +2437,7 @@ static int wait_new_events(binlog_send_info *info, /* in */
PSI_stage_info old_stage;
mysql_bin_log.lock_binlog_end_pos();
info->thd->ENTER_COND(mysql_bin_log.get_log_cond(),
info->thd->ENTER_COND(mysql_bin_log.get_bin_log_cond(),
mysql_bin_log.get_binlog_end_pos_lock(),
&stage_master_has_sent_all_binlog_to_slave,
&old_stage);