List:Commits« Previous MessageNext Message »
From:He Zhenxing Date:September 8 2009 4:40am
Subject:bzr commit into mysql-5.4 branch (zhenxing.he:2802) Bug#45852
View as plain text  
#At file:///media/sdb2/hezx/work/mysql/bzrwork/b45852/azalea-bugfixing/ based on revid:alik@stripped

 2802 He Zhenxing	2009-09-08
      Bug#45852 Semisynch: Last_IO_Error: Fatal error: Failed to run 'after_queue_event' hook
      
      Errors when send reply to master should never cause the IO thread
      to stop, because master can fall back to async replication if it
      does not get reply from slave.
      
      The problem is fixed by deliberately ignore the return value of
      slaveReply.
     @ plugin/semisync/semisync_slave.cc
        Change the error message when send reply failed
     @ plugin/semisync/semisync_slave_plugin.cc
        Deliberately ignore the return value of slaveReply so that errors
        while sending slave reply will not cause the IO thread to stop.

    M  plugin/semisync/semisync_slave.cc
    M  plugin/semisync/semisync_slave_plugin.cc
=== modified file 'plugin/semisync/semisync_slave.cc'
--- a/plugin/semisync/semisync_slave.cc	2009-06-15 13:30:20 +0000
+++ b/plugin/semisync/semisync_slave.cc	2009-09-08 04:40:33 +0000
@@ -111,7 +111,10 @@ int ReplSemiSyncSlave::slaveReply(const 
           (unsigned long long)log_pos, log_name);
   if (mysql_real_query(mysql_reply, query, strlen(query)))
   {
-    sql_print_error("Set 'rpl_semi_sync_master_reply_log_file_pos' on master failed");
+    sql_print_error("Send reply (log %s, position %lu) to master failed: %s (%d)",
+                    log_name, (ulong)log_pos,
+                    mysql_error(mysql_reply),
+                    mysql_errno(mysql_reply));
     mysql_free_result(mysql_store_result(mysql_reply));
     mysql_close(mysql_reply);
     mysql_reply= 0;

=== modified file 'plugin/semisync/semisync_slave_plugin.cc'
--- a/plugin/semisync/semisync_slave_plugin.cc	2009-07-07 02:44:17 +0000
+++ b/plugin/semisync/semisync_slave_plugin.cc	2009-09-08 04:40:33 +0000
@@ -106,8 +106,15 @@ int repl_semi_slave_queue_event(Binlog_r
 				uint32 flags)
 {
   if (rpl_semi_sync_slave_status && semi_sync_need_reply)
-    return repl_semisync.slaveReply(param->master_log_name,
+  {
+    /*
+      We deliberately ignore the error in slaveReply, such error
+      should not cause the slave IO thread to stop, and the error
+      messages are already reported.
+    */
+    (void) repl_semisync.slaveReply(param->master_log_name,
                                     param->master_log_pos);
+  }
   return 0;
 }
 


Attachment: [text/bzr-bundle] bzr/zhenxing.he@sun.com-20090908044033-lrn532ga8z0hm9gw.bundle
Thread
bzr commit into mysql-5.4 branch (zhenxing.he:2802) Bug#45852He Zhenxing8 Sep