List:Commits« Previous MessageNext Message »
From:Andrei Elkin Date:November 22 2010 7:43pm
Subject:bzr push into mysql-next-mr.crash-safe branch (andrei.elkin:3214 to 3215)
WL#5569
View as plain text  
 3215 Andrei Elkin	2010-11-22
      wl#5569
      
      extinding futher interfaces to wl#5599 with propagating future_event_relay_log_pos
      to the Worker exec context.
     @ sql/log_event.cc
        extract the stored future_event_relay_log_pos to copy to worker rli.
     @ sql/rpl_slave.cc
        Store future_event_relay_log_pos into event member.

    modified:
      sql/log_event.cc
      sql/log_event.h
      sql/rpl_slave.cc
 3214 Andrei Elkin	2010-11-20
      wl#5569 MTS
      
      Worker pool start, stop, kills, error out implementation.
     @ mysql-test/extra/rpl_tests/rpl_parallel_load.test
        increasing the load param to get more reliable benchmarking data out of the test.
     @ mysql-test/suite/rpl/r/rpl_parallel_start_stop.result
        a new tests results.
     @ mysql-test/suite/rpl/t/rpl_parallel_start_stop.test
        worker pool start, stop, kills, errors testing.
     @ sql/log_event.cc
        removing a false and unnessary extention-arg to exit_cond();
        Refining start-stop alg to base on the Worker private info, not
        the common info.
        In particular handshakes organized through magic value of length of the Worker
        private queue to is set by an initiator.
     @ sql/rpl_slave.cc
        Starting a worker thread with passing its Slave_worker * pointer.
        Simplifying and refining start-stop.
     @ sql/sql_class.h
        removing a false and unnessary extention-arg to exit_cond();
     @ sql/sys_vars.cc
        Reckoning a magic value outside of the valid range for pending_jobs.

    added:
      mysql-test/suite/rpl/r/rpl_parallel_start_stop.result
      mysql-test/suite/rpl/t/rpl_parallel_start_stop.test
    modified:
      mysql-test/extra/rpl_tests/rpl_parallel_load.test
      sql/log_event.cc
      sql/rpl_rli.h
      sql/rpl_rli_pdb.h
      sql/rpl_slave.cc
      sql/sql_class.h
      sql/sys_vars.cc
=== modified file 'sql/log_event.cc'
--- a/sql/log_event.cc	2010-11-20 17:23:42 +0000
+++ b/sql/log_event.cc	2010-11-22 18:57:13 +0000
@@ -2497,6 +2497,7 @@ int slave_worker_exec_job(Slave_worker *
     w->slave_worker_ends_group(ev->mts_group_cnt);
   }
 
+  w->w_rli->set_future_event_relay_log_pos(ev->future_event_relay_log_pos);
   error= ev->do_apply_event(rli);
 
   mysql_mutex_lock(&w->jobs_lock);

=== modified file 'sql/log_event.h'
--- a/sql/log_event.h	2010-11-19 14:51:58 +0000
+++ b/sql/log_event.h	2010-11-22 18:57:13 +0000
@@ -999,6 +999,9 @@ public:
   */
   ulong mts_group_cnt;
 
+  /* a copy of the main rli value stored into event to pass to MTS worker rli */
+  ulonglong future_event_relay_log_pos;
+
 #ifdef MYSQL_SERVER
   THD* thd;
 

=== modified file 'sql/rpl_slave.cc'
--- a/sql/rpl_slave.cc	2010-11-20 17:23:42 +0000
+++ b/sql/rpl_slave.cc	2010-11-22 18:57:13 +0000
@@ -5106,7 +5106,8 @@ static Log_event* next_event(Relay_log_i
         read it while we have a lock, to avoid a mutex lock in
         inc_event_relay_log_pos()
       */
-      rli->set_future_event_relay_log_pos(my_b_tell(cur_log)); // TODO_MTS: ev->f_rlp
+      rli->set_future_event_relay_log_pos(my_b_tell(cur_log));
+      ev->future_event_relay_log_pos= rli->get_future_event_relay_log_pos();
       if (hot_log)
         mysql_mutex_unlock(log_lock);
       DBUG_RETURN(ev);


Attachment: [text/bzr-bundle] bzr/andrei.elkin@oracle.com-20101122185713-vu8lgbp4l41f48cv.bundle
Thread
bzr push into mysql-next-mr.crash-safe branch (andrei.elkin:3214 to 3215)WL#5569Andrei Elkin22 Nov