List:Commits« Previous MessageNext Message »
From:Andrei Elkin Date:March 16 2012 10:31am
Subject:bzr push into mysql-trunk branch (andrei.elkin:3790 to 3791) Bug#12400313
View as plain text  
 3791 Andrei Elkin	2012-03-16
      Bug#12400313 - RELAY_LOG_SPACE_LIMIT IS NOT WORKING IN MANY CASES
      
      Post-push fixes to correct rli->sql_force_rotate_relay pattern of the
      main patch in MTS case.
      Similarly to STS case rotation of the over-sized relay-log is allowed 
      only if there is no transaction "transiting" to the next log.
     @ mysql-test/suite/rpl/t/rpl_stm_relay_ign_space.test
        relaxing assert tolerance.
     @ sql/rpl_slave.cc
        extending rli->sql_force_rotate_relay pattern to MTS case.

    modified:
      mysql-test/suite/rpl/t/rpl_stm_relay_ign_space.test
      sql/rpl_slave.cc
 3790 Bjorn Munch	2012-03-16 [merge]
      upmerge 13619394 revert fix

    modified:
      unittest/mysys/my_vsnprintf-t.c
=== modified file 'mysql-test/suite/rpl/t/rpl_stm_relay_ign_space.test'
--- a/mysql-test/suite/rpl/t/rpl_stm_relay_ign_space.test	2012-03-12 23:26:00 +0000
+++ b/mysql-test/suite/rpl/t/rpl_stm_relay_ign_space.test	2012-03-16 10:29:55 +0000
@@ -82,7 +82,7 @@ INSERT INTO t1 VALUES ('xxxxxxxxxxxxxxxx
 --let $relay_log_space_while_sql_is_executing = query_get_value(SHOW SLAVE STATUS, Relay_Log_Space, 1)
 --let $relay_log_space_limit = query_get_value(SHOW VARIABLES LIKE "relay_log_space_limit", Value, 1)
 --let $assert_text= Assert that relay log space is close to the limit
---let $assert_cond= $relay_log_space_while_sql_is_executing <= $relay_log_space_limit * 1.15
+--let $assert_cond= $relay_log_space_while_sql_is_executing <= $relay_log_space_limit * 1.20
 --source include/assert.inc
 
 # unlock the table and let SQL thread continue applying events

=== modified file 'sql/rpl_slave.cc'
--- a/sql/rpl_slave.cc	2012-03-14 09:52:49 +0000
+++ b/sql/rpl_slave.cc	2012-03-16 10:29:55 +0000
@@ -6851,7 +6851,22 @@ static Log_event* next_event(Relay_log_i
             rli->log_space_limit < rli->log_space_total)
         {
           /* force rotation if not in an unfinished group */
-          rli->sql_force_rotate_relay= !rli->is_in_group();
+          if (!rli->is_parallel_exec())
+          {
+            rli->sql_force_rotate_relay= !rli->is_in_group();
+          }
+          else
+          {
+            if (rli->mts_group_status != Relay_log_info::MTS_IN_GROUP)
+            {
+              /*
+                Before to let the current relay log be purged Workers
+                have to finish off their current assignments.
+              */
+              (void) wait_for_workers_to_finish(rli);
+              rli->sql_force_rotate_relay= true;
+            }
+          }
 
           /* ask for one more event */
           rli->ignore_log_space_limit= true;

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (andrei.elkin:3790 to 3791) Bug#12400313Andrei Elkin16 Mar