[Commits] Rev 4032: MDEV-5789: race between rpl_parallel_change_thread_count and slave start upon server start without --skip-slave-start in http://bazaar.launchpad.net/~maria-captains/maria/10.0

knielsen at knielsen-hq.org knielsen at knielsen-hq.org
Fri Mar 7 13:08:39 EET 2014


At http://bazaar.launchpad.net/~maria-captains/maria/10.0

------------------------------------------------------------
revno: 4032
revision-id: knielsen at knielsen-hq.org-20140307110838-6bcfg76c55po938h
parent: knielsen at knielsen-hq.org-20140307110209-4d9fqr28j3deiiy2
committer: knielsen at knielsen-hq.org
branch nick: tmp-10.0
timestamp: Fri 2014-03-07 12:08:38 +0100
message:
  MDEV-5789: race between rpl_parallel_change_thread_count and slave start upon server start without --skip-slave-start
  
  Make sure to signal the condition variable for the thread pool after
  the new threads have been added to the pool.
  
  Thanks to user nanyi607rao, who reported this bug on maria-developers at .
=== modified file 'sql/rpl_parallel.cc'
--- a/sql/rpl_parallel.cc	2014-03-07 11:02:09 +0000
+++ b/sql/rpl_parallel.cc	2014-03-07 11:08:38 +0000
@@ -705,6 +705,11 @@ rpl_parallel_change_thread_count(rpl_par
     pool->changing= false;
     mysql_mutex_unlock(&LOCK_active_mi);
   }
+
+  mysql_mutex_lock(&pool->LOCK_rpl_thread_pool);
+  mysql_cond_broadcast(&pool->COND_rpl_thread_pool);
+  mysql_mutex_unlock(&pool->LOCK_rpl_thread_pool);
+
   return 0;
 
 err:



More information about the commits mailing list