List:Commits« Previous MessageNext Message »
From:jonas Date:September 7 2007 7:30am
Subject:bk commit into 5.1 tree (jonas:1.2608) BUG#30884
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of jonas. When jonas does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-09-07 07:30:02+02:00, jonas@stripped +4 -0
  ndb - bug#30884
    Fix assignement of "fake events" so that they dont cause out of order buckets

  storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp@stripped, 2007-09-07 07:29:59+02:00,
jonas@stripped +3 -2
    soem extra info if error

  storage/ndb/src/kernel/blocks/suma/Suma.cpp@stripped, 2007-09-07 07:29:59+02:00,
jonas@stripped +24 -8
    fix typo
    change some gci printouts to %u/%u

  storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp@stripped, 2007-09-07 07:29:59+02:00,
jonas@stripped +3 -3
    When assigning a GCI to a non-gci event, (i.e fake a GCI)
    make sure to init to a GCI that will arrive, if no known GCI's exists

  storage/ndb/src/ndbapi/TransporterFacade.cpp@stripped, 2007-09-07 07:29:59+02:00,
jonas@stripped +18 -4
    make inline instead of macro

diff -Nrup a/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
b/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
--- a/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2007-09-05 15:19:57 +02:00
+++ b/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2007-09-07 07:29:59 +02:00
@@ -15531,7 +15531,7 @@ crash:
   char buf[255];
   BaseString::snprintf(buf, sizeof(buf), 
 		       "Error while reading REDO log. from %d\n"
-		       "D=%d, F=%d Mb=%d FP=%d W1=%d W2=%d : %s",
+		       "D=%d, F=%d Mb=%d FP=%d W1=%d W2=%d : %s gci: %u",
 		       signal->theData[8],
 		       signal->theData[2], 
 		       signal->theData[3], 
@@ -15539,7 +15539,8 @@ crash:
 		       signal->theData[5], 
 		       signal->theData[6], 
 		       signal->theData[7],
-		       crash_msg ? crash_msg : "");
+		       crash_msg ? crash_msg : "",
+		       logPartPtr.p->logLastGci);
   
   progError(__LINE__, NDBD_EXIT_SR_REDOLOG, buf);  
 }//Dblqh::execSr()
diff -Nrup a/storage/ndb/src/kernel/blocks/suma/Suma.cpp
b/storage/ndb/src/kernel/blocks/suma/Suma.cpp
--- a/storage/ndb/src/kernel/blocks/suma/Suma.cpp	2007-09-05 15:19:57 +02:00
+++ b/storage/ndb/src/kernel/blocks/suma/Suma.cpp	2007-09-07 07:29:59 +02:00
@@ -2720,7 +2720,7 @@ Suma::sendSubStopComplete(Signal* signal
     const Uint64 gci = get_current_gci(signal);
     SubTableData * data  = (SubTableData*)signal->getDataPtrSend();
     data->gci_hi         = Uint32(gci >> 32);
-    data->gci_lo         = gci;
+    data->gci_lo         = Uint32(gci);
     data->tableId        = 0;
     data->requestInfo    = 0;
     SubTableData::setOperation(data->requestInfo, 
@@ -2765,7 +2765,7 @@ Suma::reportAllSubscribers(Signal *signa
       !c_startup.m_restart_server_node_id)
   {
     data->gci_hi         = Uint32(gci >> 32);
-    data->gci_lo         = Uint32(32);
+    data->gci_lo         = Uint32(gci);
     data->tableId        = subPtr.p->m_tableId;
     data->requestInfo    = 0;
     SubTableData::setOperation(data->requestInfo, 
@@ -3550,7 +3550,13 @@ Suma::execSUB_GCP_COMPLETE_REP(Signal* s
       {
 	Uint32 state = c_buckets[i].m_state;
 	m_switchover_buckets.clear(i);
-	printf("switchover complete bucket %d state: %x", i, state);
+	printf("%u/%u (%u/%u) switchover complete bucket %d state: %x", 
+	       Uint32(gci >> 32),
+	       Uint32(gci),
+	       Uint32(c_buckets[i].m_switchover_gci >> 32),
+	       Uint32(c_buckets[i].m_switchover_gci),
+	       i, state);
+
 	if(state & Bucket::BUCKET_STARTING)
 	{
 	  /**
@@ -3893,7 +3899,8 @@ Suma::execSUB_GCP_COMPLETE_ACK(Signal* s
   
   if(gcp.isNull())
   {
-    ndbout_c("ACK wo/ gcp record (gci: %llu)", gci);
+    ndbout_c("ACK wo/ gcp record (gci: %u/%u)", 
+	     Uint32(gci >> 32), Uint32(gci));
   }
   else
   {
@@ -4894,7 +4901,11 @@ Suma::start_resend(Signal* signal, Uint3
     jam();
     m_active_buckets.set(buck);
     m_gcp_complete_rep_count ++;
-    ndbout_c("empty bucket(RNIL) -> active");
+    ndbout_c("empty bucket(RNIL) -> active max_acked: %u/%u max_gci: %u/%u",
+	     Uint32(bucket->m_max_acked_gci >> 32),
+	     Uint32(bucket->m_max_acked_gci),
+	     Uint32(pos.m_max_gci >> 32),
+	     Uint32(pos.m_max_gci));
     return;
   }
 
@@ -4929,7 +4940,9 @@ Suma::start_resend(Signal* signal, Uint3
   signal->theData[6] = 0;
   sendSignal(reference(), GSN_CONTINUEB, signal, 7, JBB);
   
-  ndbout_c("min: %llu - max: %llu) page: %d", min, max, bucket->m_buffer_tail);
+  ndbout_c("min: %u/%u - max: %u/%u) page: %d", 
+	   Uint32(min >> 32), Uint32(min), Uint32(max >> 32), Uint32(max), 
+	   bucket->m_buffer_tail);
   ndbrequire(max >= min);
 }
 
@@ -4965,7 +4978,9 @@ Suma::resend_bucket(Signal* signal, Uint
   {
     free_page(tail, page);
     tail = bucket->m_buffer_tail = next_page;
-    ndbout_c("pos==0 && min_gci(%llu) > max_gci(%llu) resend switching page to
%d", min_gci, max_gci, tail);
+    ndbout_c("pos==0 && min_gci(%u/%u) > max_gci(%u/%u) resend switching page
to %d", 
+	     Uint32(min_gci >> 32), Uint32(min_gci), 
+	     Uint32(max_gci >> 32), Uint32(max_gci), tail);
     goto next;
   }
   
@@ -5019,7 +5034,8 @@ Suma::resend_bucket(Signal* signal, Uint
   
       char buf[255];
       c_subscriber_nodes.getText(buf);
-      ndbout_c("resending GCI: %llu rows: %d -> %s", last_gci, g_cnt, buf);
+      ndbout_c("resending GCI: %u/%u rows: %d -> %s", 
+	       Uint32(last_gci >> 32), Uint32(last_gci), g_cnt, buf);
       g_cnt = 0;
       
       NodeReceiverGroup rg(API_CLUSTERMGR, c_subscriber_nodes);
diff -Nrup a/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
b/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
--- a/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp	2007-09-05 15:19:57 +02:00
+++ b/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp	2007-09-07 07:29:59 +02:00
@@ -1969,7 +1969,7 @@ NdbEventBuffer::report_node_connected(Ui
   SubTableData::setNdbdNodeId(data.requestInfo, node_id);
   data.logType = SubTableData::LOG;
 
-  Uint64 gci = m_latestGCI + 1;
+  Uint64 gci = Uint64((m_latestGCI >> 32) + 1) << 32;
   find_max_known_gci(&gci);
 
   data.gci_hi = Uint32(gci >> 32);
@@ -2004,7 +2004,7 @@ NdbEventBuffer::report_node_failure(Uint
   SubTableData::setNdbdNodeId(data.requestInfo, node_id);
   data.logType = SubTableData::LOG;
 
-  Uint64 gci = m_latestGCI + 1;
+  Uint64 gci = Uint64((m_latestGCI >> 32) + 1) << 32;
   find_max_known_gci(&gci);
 
   data.gci_hi = Uint32(gci >> 32);
@@ -2028,7 +2028,7 @@ NdbEventBuffer::completeClusterFailed()
   DBUG_ENTER("NdbEventBuffer::completeClusterFailed");
 
 
-  Uint64 gci = m_latestGCI + 1;
+  Uint64 gci = Uint64((m_latestGCI >> 32) + 1) << 32;
   bool found = find_max_known_gci(&gci);
 
   Uint64 * array = m_known_gci.getBase();
diff -Nrup a/storage/ndb/src/ndbapi/TransporterFacade.cpp
b/storage/ndb/src/ndbapi/TransporterFacade.cpp
--- a/storage/ndb/src/ndbapi/TransporterFacade.cpp	2007-06-20 06:34:48 +02:00
+++ b/storage/ndb/src/ndbapi/TransporterFacade.cpp	2007-09-07 07:29:59 +02:00
@@ -175,11 +175,25 @@ setSignalLog(){
   }
   return false;
 }
-#ifdef TRACE_APIREGREQ
-#define TRACE_GSN(gsn) true
-#else
-#define TRACE_GSN(gsn) (gsn != GSN_API_REGREQ && gsn != GSN_API_REGCONF)
+inline
+bool
+TRACE_GSN(Uint32 gsn)
+{
+  switch(gsn){
+#ifndef TRACE_APIREGREQ
+  case GSN_API_REGREQ:
+  case GSN_API_REGCONF:
+    return false;
 #endif
+#if 0
+  case GSN_SUB_GCP_COMPLETE_REP:
+  case GSN_SUB_GCP_COMPLETE_ACK:
+    return true;
+#endif
+  default:
+    return true;
+  }
+}
 #endif
 
 /**
Thread
bk commit into 5.1 tree (jonas:1.2608) BUG#30884jonas7 Sep