Skip to content

Commit

Permalink
Safety fix: lock binlog_end_pos before calling signal_update
Browse files Browse the repository at this point in the history
The mutex is needed to ensure that sql thread should not not miss the error
signal.
  • Loading branch information
montywi authored and vuvova committed Aug 23, 2017
1 parent 458d5ed commit f71bed0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sql/rpl_parallel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,9 @@ signal_error_to_sql_driver_thread(THD *thd, rpl_group_info *rgi, int err)
rgi->rli->stop_for_until= false;
mysql_mutex_lock(rgi->rli->relay_log.get_log_lock());
mysql_mutex_unlock(rgi->rli->relay_log.get_log_lock());
rgi->rli->relay_log.lock_binlog_end_pos();
rgi->rli->relay_log.signal_update();
rgi->rli->relay_log.unlock_binlog_end_pos();
}


Expand Down

0 comments on commit f71bed0

Please sign in to comment.