List:Commits« Previous MessageNext Message »
From:Andrei Elkin Date:December 20 2010 7:37pm
Subject:bzr commit into mysql-next-mr-wl5569 branch (andrei.elkin:3252) WL#5569
View as plain text  
#At file:///home/andrei/MySQL/BZR/2a-23May/WL/mysql-next-mr-wl5569/ based on revid:andrei.elkin@stripped

 3252 Andrei Elkin	2010-12-20
      wl#5569 MTS
      
      adding checkpoint relay_log_name,pos as necessary part to locate a relay-log for recovery.
      Tested with rpl_parallel.
     @ mysql-test/extra/rpl_tests/rpl_parallel_load.test
        restoring $iter to 1k as it was used to be.
     @ sql/log_event.cc
        adding checkpoint relay_log_name,pos
     @ sql/rpl_rli_pdb.cc
        adding checkpoint relay_log_name,pos
     @ sql/rpl_rli_pdb.h
        adding checkpoint relay_log_name,pos

    modified:
      mysql-test/extra/rpl_tests/rpl_parallel_load.test
      sql/log_event.cc
      sql/rpl_rli_pdb.cc
      sql/rpl_rli_pdb.h
=== modified file 'mysql-test/extra/rpl_tests/rpl_parallel_load.test'
--- a/mysql-test/extra/rpl_tests/rpl_parallel_load.test	2010-12-20 15:58:58 +0000
+++ b/mysql-test/extra/rpl_tests/rpl_parallel_load.test	2010-12-20 19:37:48 +0000
@@ -6,7 +6,7 @@
 # load volume parameter
 #
 
-let $iter = 500;
+let $iter = 1000;
 
 # windows run on PB2 is too slow to time out
 disable_query_log;

=== modified file 'sql/log_event.cc'
--- a/sql/log_event.cc	2010-12-20 15:58:58 +0000
+++ b/sql/log_event.cc	2010-12-20 19:37:48 +0000
@@ -2428,6 +2428,8 @@ Slave_worker *Log_event::get_slave_worke
     g.total_seqno= const_cast<Relay_log_info*>(rli)->mts_total_groups;
     g.checkpoint_log_name= NULL;
     g.checkpoint_log_pos= 0;
+    g.checkpoint_relay_log_name= NULL;
+    g.checkpoint_relay_log_pos= 0;
     g.checkpoint_seqno= (uint) -1;
     g.done= 0;
 
@@ -2534,13 +2536,21 @@ Slave_worker *Log_event::get_slave_worke
 
     if (!worker->checkpoint_notified)
     {
-      // Worker dealloc
+      // Worker to dealloc
+      // master binlog checkpoint
       ptr_g->checkpoint_log_name= (char *)
         my_malloc(strlen(const_cast<Relay_log_info*>(rli)->
                          get_group_master_log_name()) + 1, MYF(MY_WME));
       strcpy(ptr_g->checkpoint_log_name,
              const_cast<Relay_log_info*>(rli)->get_group_master_log_name());
       ptr_g->checkpoint_log_pos= const_cast<Relay_log_info*>(rli)->get_group_master_log_pos();
+      // relay log checkpoint
+      ptr_g->checkpoint_relay_log_name= (char *)
+        my_malloc(strlen(const_cast<Relay_log_info*>(rli)->
+                         get_group_relay_log_name()) + 1, MYF(MY_WME));
+      strcpy(ptr_g->checkpoint_relay_log_name,
+             const_cast<Relay_log_info*>(rli)->get_group_relay_log_name());
+      ptr_g->checkpoint_relay_log_pos= const_cast<Relay_log_info*>(rli)->get_group_relay_log_pos();
       worker->checkpoint_notified= TRUE;
     }
     ptr_g->checkpoint_seqno= rli->checkpoint_seqno;

=== modified file 'sql/rpl_rli_pdb.cc'
--- a/sql/rpl_rli_pdb.cc	2010-12-20 15:58:58 +0000
+++ b/sql/rpl_rli_pdb.cc	2010-12-20 19:37:48 +0000
@@ -23,11 +23,12 @@ Slave_worker::Slave_worker(const char* t
                            Relay_log_info *rli)
   : Rpl_info_worker(type, pfs), c_rli(rli), curr_group_exec_parts(0),
   group_relay_log_pos(0), group_master_log_pos(0),
-  checkpoint_log_pos(0), inited_group_execed(0)
+  checkpoint_log_pos(0), checkpoint_relay_log_pos(0), inited_group_execed(0)
 {
   group_relay_log_name[0]= 0;
   group_master_log_name[0]= 0;
   checkpoint_log_name[0]= 0;
+  checkpoint_relay_log_name[0]= 0;
 }
 
 Slave_worker::~Slave_worker() 
@@ -187,9 +188,14 @@ bool Slave_worker::commit_positions(Log_
     strmake(checkpoint_log_name, ptr_g->checkpoint_log_name,
             sizeof(checkpoint_log_name) - 1);
     checkpoint_log_pos= ptr_g->checkpoint_log_pos;
+    strmake(checkpoint_relay_log_name, ptr_g->checkpoint_relay_log_name,
+            sizeof(checkpoint_relay_log_name) - 1);
+    checkpoint_log_pos= ptr_g->checkpoint_relay_log_pos;
 
     my_free(ptr_g->checkpoint_log_name);
     ptr_g->checkpoint_log_name= NULL;
+    my_free(ptr_g->checkpoint_relay_log_name);
+    ptr_g->checkpoint_relay_log_name= NULL;
 
     bitmap_clear_all(&group_execed);
   }

=== modified file 'sql/rpl_rli_pdb.h'
--- a/sql/rpl_rli_pdb.h	2010-12-20 15:58:58 +0000
+++ b/sql/rpl_rli_pdb.h	2010-12-20 19:37:48 +0000
@@ -130,6 +130,8 @@ typedef struct st_slave_job_group
   uint  checkpoint_seqno;
   my_off_t checkpoint_log_pos; // T-event lop_pos filled by W for CheckPoint
   char*    checkpoint_log_name;
+  my_off_t checkpoint_relay_log_pos; // T-event lop_pos filled by W for CheckPoint
+  char*    checkpoint_relay_log_name;
   volatile uchar done;  // Flag raised by W,  read and reset by C
 } Slave_job_group;
 
@@ -251,6 +253,8 @@ public:
   ulonglong group_master_log_pos;
   char checkpoint_log_name[FN_REFLEN];
   ulonglong checkpoint_log_pos;
+  char checkpoint_relay_log_name[FN_REFLEN];
+  ulonglong checkpoint_relay_log_pos;
 
   int init_info();
   void end_info();


Attachment: [text/bzr-bundle] bzr/andrei.elkin@oracle.com-20101220193748-vt0bdqkz2cy3ktuf.bundle
Thread
bzr commit into mysql-next-mr-wl5569 branch (andrei.elkin:3252) WL#5569Andrei Elkin20 Dec