List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:June 16 2011 12:40pm
Subject:bzr commit into mysql-5.1-telco-6.3 branch (jonas:3444)
View as plain text  
#At file:///home/jonas/src/telco-6.3/ based on revid:jonas@stripped

 3444 Jonas Oreland	2011-06-16
      ndb - Make sure that INCIDENT_LOST_EVENTS is only emitted once, if setting up binlog (after binlog restart) fails.

    modified:
      sql/ha_ndbcluster_binlog.cc
=== modified file 'sql/ha_ndbcluster_binlog.cc'
--- a/sql/ha_ndbcluster_binlog.cc	2010-10-15 13:01:34 +0000
+++ b/sql/ha_ndbcluster_binlog.cc	2011-06-16 12:40:11 +0000
@@ -5728,6 +5728,13 @@ pthread_handler_t ndb_binlog_thread_func
   uint incident_id= 0;
   Binlog_thread_state do_ndbcluster_binlog_close_connection;
 
+  /**
+   * If we get error after having reported incident
+   *   but before binlog started...we do "Restarting Cluster Binlog"
+   *   in that case, don't report incident again
+   */
+  bool do_incident = true;
+
 #ifdef RUN_NDB_BINLOG_TIMER
   Timer main_timer;
 #endif
@@ -5868,7 +5875,7 @@ restart_cluster_failure:
   /*
     Main NDB Injector loop
   */
-  while (ndb_binlog_running)
+  while (do_incident && ndb_binlog_running)
   {
     /*
       check if it is the first log, if so we do not insert a GAP event
@@ -5900,6 +5907,7 @@ restart_cluster_failure:
     int ret = inj->record_incident(thd, INCIDENT_LOST_EVENTS,
                                    msg[incident_id]);
     assert(ret == 0);
+    do_incident = false; // Don't report incident again, unless we get started
     break;
   }
   incident_id= 1;
@@ -6025,6 +6033,7 @@ restart_cluster_failure:
     static char db[]= "";
     thd->db= db;
   }
+  do_incident = true; // If we get disconnected again...do incident report
   do_ndbcluster_binlog_close_connection= BCCC_running;
   for ( ; !((ndbcluster_binlog_terminating ||
              do_ndbcluster_binlog_close_connection) &&


Attachment: [text/bzr-bundle] bzr/jonas@mysql.com-20110616124011-gl1x59u9udsl0odq.bundle
Thread
bzr commit into mysql-5.1-telco-6.3 branch (jonas:3444) Jonas Oreland16 Jun