List:Commits« Previous MessageNext Message »
From:Andrei Elkin Date:September 17 2010 7:30pm
Subject:bzr commit into mysql-next-mr branch (aelkin:3203) WL#5563
View as plain text  
#At file:///home/andrei/MySQL/BZR/2a-23May/WL/wl5563-paraslave_part_db/ based on revid:aelkin@stripped

 3203 Andrei Elkin	2010-09-17
      wl#5563
      
      fixing STOP SLAVE for workers. Race for thd of a worker is excluded via engaging the coordinator to clean up worker areas.

    modified:
      mysql-test/extra/rpl_tests/rpl_parallel_load.test
      sql/rpl_slave.cc
=== modified file 'mysql-test/extra/rpl_tests/rpl_parallel_load.test'
--- a/mysql-test/extra/rpl_tests/rpl_parallel_load.test	2010-09-17 18:19:56 +0000
+++ b/mysql-test/extra/rpl_tests/rpl_parallel_load.test	2010-09-17 19:30:51 +0000
@@ -1,5 +1,5 @@
 let $workers = 4; ## todo: to convert to a queriable var
-let $iter = 2000;
+let $iter = 500;
 
 connection slave;
 

=== modified file 'sql/rpl_slave.cc'
--- a/sql/rpl_slave.cc	2010-09-17 08:49:00 +0000
+++ b/sql/rpl_slave.cc	2010-09-17 19:30:51 +0000
@@ -3481,10 +3481,10 @@ err:
   rli->pending_jobs= 0;
   mysql_mutex_unlock(&rli->pending_jobs_lock);
   mysql_cond_signal(&rli->pending_jobs_cond); // informing the parent
-  mysql_mutex_lock(&LOCK_thread_count);
-  THD_CHECK_SENTRY(thd);
-  delete thd;
-  mysql_mutex_unlock(&LOCK_thread_count);
+  //mysql_mutex_lock(&LOCK_thread_count);
+  //THD_CHECK_SENTRY(thd);
+  //delete thd;
+  //mysql_mutex_unlock(&LOCK_thread_count);
   my_thread_end();
   pthread_exit(0);
   DBUG_RETURN(0);        
@@ -3559,6 +3559,11 @@ void slave_stop_workers(Relay_log_info *
     mysql_mutex_destroy(&w->jobs_lock);
     mysql_cond_destroy(&w->jobs_cond);
     free_root(&w->mem_root, MYF(0));
+    mysql_mutex_lock(&LOCK_thread_count);
+    THD_CHECK_SENTRY(w->thd);
+    delete w->thd;
+    mysql_mutex_unlock(&LOCK_thread_count);
+
     delete_dynamic_element(&rli->workers, i);
     delete w;
   }


Attachment: [text/bzr-bundle] bzr/aelkin@mysql.com-20100917193051-r1zyla3peo9q6j82.bundle
Thread
bzr commit into mysql-next-mr branch (aelkin:3203) WL#5563Andrei Elkin17 Sep