List:Commits« Previous MessageNext Message »
From:Alfranio Correia Date:December 22 2010 12:30pm
Subject:bzr push into mysql-next-mr-wl5569 branch (alfranio.correia:3257 to 3258)
WL#5599
View as plain text  
 3258 Alfranio Correia	2010-12-22
      WL#5599
      
      Removed workers' information whenever rli's information is removed.

    modified:
      sql/rpl_slave.cc
 3257 Andrei Elkin	2010-12-22
      wl#5569 MTS and wl#5599 MTS recovery
      
      The general recovery implementation is finished by this patch.
      Tested against  ./mtr rpl_parallel_conf_limits.
      
      Warning, ./mtr rpl_parallel_conf_limits rpl_parallel_conf_limits ...
      can fail at the 2nd etc test because of no removal of Worker tables happens at RESET SLAVE.
     @ sql/log_event.cc
        adding a special to mts-recovery branch to the event scheduling routine located
        in Log_event::apply_event().
        todo: think about rli->flush_info() at the end of gap-filling.
     @ sql/rpl_rli.cc
        to be recovered group counter and a running index on the recovery bitmap are
        init-ed, also renaming.
        In recovery phase Coordinator can execute rows-events now.
     @ sql/rpl_rli.h
        to be recovered group counter and a running index on the recovery bitmap is added.
     @ sql/rpl_slave.cc
        engaging to be recovered group counter in mts_recovery_groups() in the end of which
        the recovery bitmap is ready and rli->mts_recovery_group_cnt counted how many bits of 
        interest in there.
        
        No actual recovery case is followed by
        rli->recovery_parallel_workers= rli->slave_parallel_workers
        at Workers startup time.

    modified:
      sql/log_event.cc
      sql/rpl_rli.cc
      sql/rpl_rli.h
      sql/rpl_slave.cc
=== modified file 'sql/rpl_slave.cc'
--- a/sql/rpl_slave.cc	2010-12-22 11:57:18 +0000
+++ b/sql/rpl_slave.cc	2010-12-22 12:30:09 +0000
@@ -460,7 +460,8 @@ void end_info(Master_info* mi)
 
 int remove_info(Master_info* mi)
 {
-  int error= 0;
+  int error= 1;
+  Slave_worker *worker= NULL;
   DBUG_ENTER("remove_info");
   DBUG_ASSERT(mi != NULL && mi->rli != NULL);
 
@@ -486,10 +487,30 @@ int remove_info(Master_info* mi)
   mi->end_info();
   mi->rli->end_info();
 
-  if (mi->remove_info() ||
-      mi->rli->remove_info())
-    error= 1;
+  if (mi->remove_info())
+    goto err;
 
+  for (uint id= 0; id < mi->rli->recovery_parallel_workers; id++)
+  {
+    if (!(worker=
+          Rpl_info_factory::create_worker(opt_worker_repository_id, id, mi->rli)))
+      goto err;
+
+    if (worker->init_info() || worker->remove_info())
+    {
+      delete worker;
+      goto err;
+    }
+
+    delete worker;
+  }
+
+  if (mi->rli->remove_info())
+    goto err;
+
+  error= 0;
+
+err:
   DBUG_RETURN(error);
 }
 

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-next-mr-wl5569 branch (alfranio.correia:3257 to 3258)WL#5599Alfranio Correia22 Dec