summaryrefslogtreecommitdiff
path: root/sql/rpl_parallel.cc
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2017-03-06 16:02:50 +0200
committerMonty <monty@mariadb.org>2017-03-16 14:21:32 +0200
commite7f55fde8817508b77bef0ec2352a02e1f0ea2c4 (patch)
tree2586624f6a325df7b0161522aba2c922402dbae4 /sql/rpl_parallel.cc
parent2c2bd8c1556b081fccd0fc3e010dc3ea2c38fffb (diff)
downloadmariadb-git-e7f55fde8817508b77bef0ec2352a02e1f0ea2c4.tar.gz
Removed wrong assert
The following is an updated commit message for the following commit that was pushed before I had a chance to update the commit message: c5e25c8b40e8c75d690dbc0e441abbefdd3cdcf4 Fixed dead locks when doing stop slave while slave was starting. - Added a separate lock for protecting start/stop/reset of a specific slave. This solves some possible dead locks when one calls stop slave while the slave is starting as the old run_locks was over used for other things. - Set hash->records to 0 before calling free of all hash elements. This was set to stop concurrent threads to loop over hash elements and access members that was already freed. This was a problem especially in start_all_slaves/stop_all_slaves as the mutex protecting the hash was temporarily released while a slave was started/stopped. - Because of change to hash->records during hash_reset(), any_slave_sql_running() will return 1 during shutdown as one can't loop over master_info_index->master_info_hash while hash_reset() of it is in progress. This also fixes a potential old bug in any_slave_sql_running() where during shutdown and ~Master_info_index(), my_hash_free() we could potentially try to access elements that was already freed.
Diffstat (limited to 'sql/rpl_parallel.cc')
-rw-r--r--sql/rpl_parallel.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/sql/rpl_parallel.cc b/sql/rpl_parallel.cc
index 44f60e4482b..e5964e9c038 100644
--- a/sql/rpl_parallel.cc
+++ b/sql/rpl_parallel.cc
@@ -1300,11 +1300,10 @@ handle_rpl_parallel_thread(void *arg)
*/
rpl_parallel_entry *e= rpt->current_entry;
/*
- Ensure that we will unblock rpl_pause_for_ftrwl()
- e->pause_sub_id may be LONGLONG_MAX if rpt->current_entry has changed
+ Wait for rpl_unpause_after_ftwrl() to wake us up.
+ Note that rpl_pause_for_ftwrl() may wait for 'e->pause_sub_id'
+ to change. This should happen eventually in finish_event_group()
*/
- DBUG_ASSERT(e->pause_sub_id == (uint64)ULONGLONG_MAX ||
- e->last_committed_sub_id >= e->pause_sub_id);
mysql_mutex_lock(&e->LOCK_parallel_entry);
mysql_mutex_unlock(&rpt->LOCK_rpl_thread);
if (rpt->pause_for_ftwrl)