List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:November 17 2011 8:50am
Subject:bzr push into mysql-5.1-telco-7.0 branch (jonas.oreland:4672 to 4673)
View as plain text  
 4673 Jonas Oreland	2011-11-17
      ndb - add counter for reads being sent to local node, LOCAL_READS

    modified:
      storage/ndb/src/common/debugger/EventLogger.cpp
      storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp
      storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
      storage/ndb/src/kernel/vm/Ndbinfo.hpp
      storage/ndb/tools/ndbinfo_sql.cpp
 4672 Jonas Oreland	2011-11-17
      ndb - set correct maxFragments also for ndbd

    modified:
      storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
=== modified file 'storage/ndb/src/common/debugger/EventLogger.cpp'
--- a/storage/ndb/src/common/debugger/EventLogger.cpp	2011-10-21 08:59:23 +0000
+++ b/storage/ndb/src/common/debugger/EventLogger.cpp	2011-11-17 08:49:40 +0000
@@ -527,23 +527,47 @@ void getTextTransReportCounters(QQQQ) {
   // -------------------------------------------------------------------  
   // Report information about transaction activity once per 10 seconds.
   // ------------------------------------------------------------------- 
-  BaseString::snprintf(m_text, m_text_len, 
-		       "Trans. Count = %u, Commit Count = %u, "
-		       "Read Count = %u, Simple Read Count = %u, "
-		       "Write Count = %u, AttrInfo Count = %u, "
-		       "Concurrent Operations = %u, Abort Count = %u"
-		       " Scans = %u Range scans = %u", 
-		       theData[1], 
-		       theData[2], 
-		       theData[3], 
-		       theData[4],
-		       theData[5], 
-		       theData[6], 
-		       theData[7], 
-		       theData[8],
-		       theData[9],
-		       theData[10]);
+  if (len <= 11)
+  {
+    BaseString::snprintf(m_text, m_text_len,
+                         "Trans. Count = %u, Commit Count = %u, "
+                         "Read Count = %u, Simple Read Count = %u, "
+                         "Write Count = %u, AttrInfo Count = %u, "
+                         "Concurrent Operations = %u, Abort Count = %u"
+                         " Scans = %u Range scans = %u",
+                         theData[1],
+                         theData[2],
+                         theData[3],
+                         theData[4],
+                         theData[5],
+                         theData[6],
+                         theData[7],
+                         theData[8],
+                         theData[9],
+                         theData[10]);
+  }
+  else
+  {
+    BaseString::snprintf(m_text, m_text_len,
+                         "Trans. Count = %u, Commit Count = %u, "
+                         "Read Count = %u, Simple Read Count = %u, "
+                         "Write Count = %u, AttrInfo Count = %u, "
+                         "Concurrent Operations = %u, Abort Count = %u"
+                         " Scans = %u Range scans = %u, Local Read Count = %u",
+                         theData[1],
+                         theData[2],
+                         theData[3],
+                         theData[4],
+                         theData[5],
+                         theData[6],
+                         theData[7],
+                         theData[8],
+                         theData[9],
+                         theData[10],
+                         theData[11]);
+  }
 }
+
 void getTextOperationReportCounters(QQQQ) {
   BaseString::snprintf(m_text, m_text_len,
 		       "Operations=%u",

=== modified file 'storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp'
--- a/storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp	2011-10-28 09:56:57 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp	2011-11-17 08:49:40 +0000
@@ -1769,6 +1769,7 @@ private:
     Uint64 cabortCount;
     Uint64 c_scan_count;
     Uint64 c_range_scan_count;
+    Uint64 clocalReadCount;
 
     // Resource usage counter(not monotonic)
     Uint32 cconcurrentOp;
@@ -1783,6 +1784,7 @@ private:
      cabortCount(0),
      c_scan_count(0),
      c_range_scan_count(0),
+     clocalReadCount(0),
      cconcurrentOp(0) {}
 
     Uint32 build_event_rep(Signal* signal)
@@ -1800,6 +1802,7 @@ private:
       const Uint32 abortCount =       diff(signal, 13, cabortCount);
       const Uint32 scan_count =       diff(signal, 15, c_scan_count);
       const Uint32 range_scan_count = diff(signal, 17, c_range_scan_count);
+      const Uint32 localread_count = diff(signal, 19, clocalReadCount);
 
       signal->theData[0] = NDB_LE_TransReportCounters;
       signal->theData[1] = transCount;
@@ -1812,7 +1815,8 @@ private:
       signal->theData[8] = abortCount;
       signal->theData[9] = scan_count;
       signal->theData[10] = range_scan_count;
-      return 11;
+      signal->theData[11] = localread_count;
+      return 12;
     }
 
     Uint32 build_continueB(Signal* signal) const
@@ -1821,7 +1825,9 @@ private:
       const Uint64* vars[] = {
         &cattrinfoCount, &ctransCount, &ccommitCount,
         &creadCount, &csimpleReadCount, &cwriteCount,
-        &cabortCount, &c_scan_count, &c_range_scan_count };
+        &cabortCount, &c_scan_count, &c_range_scan_count,
+        &clocalReadCount
+      };
       const size_t num = sizeof(vars)/sizeof(vars[0]);
 
       for (size_t i = 0; i < num; i++)

=== modified file 'storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp	2011-10-23 08:34:49 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp	2011-11-17 08:49:40 +0000
@@ -3356,7 +3356,10 @@ void Dbtc::tckeyreq050Lab(Signal* signal
     jam();
     regTcPtr->lastReplicaNo = 0;
     regTcPtr->noOfNodes = 1;
-  } 
+
+    if (regTcPtr->tcNodedata[0] == getOwnNodeId())
+      c_counters.clocalReadCount++;
+  }
   else if (Toperation == ZUNLOCK)
   {
     regTcPtr->m_special_op_flags &= ~TcConnectRecord::SOF_REORG_MOVING;
@@ -13260,7 +13263,8 @@ void Dbtc::execDBINFO_SCANREQ(Signal *si
       { Ndbinfo::WRITES_COUNTER, c_counters.cwriteCount },
       { Ndbinfo::ABORTS_COUNTER, c_counters.cabortCount },
       { Ndbinfo::TABLE_SCANS_COUNTER, c_counters.c_scan_count },
-      { Ndbinfo::RANGE_SCANS_COUNTER, c_counters.c_range_scan_count }
+      { Ndbinfo::RANGE_SCANS_COUNTER, c_counters.c_range_scan_count },
+      { Ndbinfo::LOCAL_READ_COUNTER, c_counters.clocalReadCount }
     };
     const size_t num_counters = sizeof(counters) / sizeof(counters[0]);
 

=== modified file 'storage/ndb/src/kernel/vm/Ndbinfo.hpp'
--- a/storage/ndb/src/kernel/vm/Ndbinfo.hpp	2011-10-11 08:11:15 +0000
+++ b/storage/ndb/src/kernel/vm/Ndbinfo.hpp	2011-11-17 08:49:40 +0000
@@ -194,7 +194,8 @@ public:
     SPJ_SCAN_BATCHES_RETURNED_COUNTER = 20,
     SPJ_SCAN_ROWS_RETURNED_COUNTER = 21,
     SPJ_PRUNED_RANGE_SCANS_RECEIVED_COUNTER = 22,
-    SPJ_CONST_PRUNED_RANGE_SCANS_RECEIVED_COUNTER = 23
+    SPJ_CONST_PRUNED_RANGE_SCANS_RECEIVED_COUNTER = 23,
+    LOCAL_READ_COUNTER = 24
   };
 
   struct counter_entry {

=== modified file 'storage/ndb/tools/ndbinfo_sql.cpp'
--- a/storage/ndb/tools/ndbinfo_sql.cpp	2011-10-28 09:56:57 +0000
+++ b/storage/ndb/tools/ndbinfo_sql.cpp	2011-11-17 08:49:40 +0000
@@ -134,6 +134,7 @@ struct view {
     "  WHEN 21 THEN \"SCAN_ROWS_RETURNED\""
     "  WHEN 22 THEN \"PRUNED_RANGE_SCANS_RECEIVED\""
     "  WHEN 23 THEN \"CONST_PRUNED_RANGE_SCANS_RECEIVED\""
+    "  WHEN 24 THEN \"LOCAL_READS\""
     "  ELSE \"<unknown>\" "
     " END AS counter_name, "
     "val "

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1-telco-7.0 branch (jonas.oreland:4672 to 4673) Jonas Oreland17 Nov