List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:November 17 2011 12:00pm
Subject:bzr push into mysql-5.1-telco-7.0-trpman branch (jonas.oreland:4673 to 4674)
View as plain text  
 4674 Jonas Oreland	2011-11-17
      ndb - partial trpman (for CluB X.X)

    modified:
      .bzr-mysql/default.conf
      mysql-test/suite/ndb/r/ndbinfo.result
      mysql-test/suite/ndb/r/ndbinfo_dump.result
      storage/ndb/include/kernel/BlockNumbers.h
      storage/ndb/include/kernel/GlobalSignalNumbers.h
      storage/ndb/include/kernel/signaldata/CloseComReqConf.hpp
      storage/ndb/include/kernel/signaldata/DisconnectRep.hpp
      storage/ndb/include/kernel/signaldata/EnableCom.hpp
      storage/ndb/include/kernel/signaldata/RouteOrd.hpp
      storage/ndb/src/common/debugger/BlockNames.cpp
      storage/ndb/src/kernel/SimBlockList.cpp
      storage/ndb/src/kernel/blocks/CMakeLists.txt
      storage/ndb/src/kernel/blocks/Makefile.am
      storage/ndb/src/kernel/blocks/dbinfo/Dbinfo.cpp
      storage/ndb/src/kernel/blocks/trpman.cpp
      storage/ndb/src/kernel/vm/mt.cpp
 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
=== modified file '.bzr-mysql/default.conf'
--- a/.bzr-mysql/default.conf	2011-09-02 08:40:48 +0000
+++ b/.bzr-mysql/default.conf	2011-11-17 11:58:33 +0000
@@ -1,4 +1,4 @@
 [MYSQL]
 post_commit_to = commits@stripped
 post_push_to = commits@stripped
-tree_name = mysql-5.1-telco-7.0
+tree_name = mysql-5.1-telco-7.0-trpman

=== modified file 'mysql-test/suite/ndb/r/ndbinfo.result'
--- a/mysql-test/suite/ndb/r/ndbinfo.result	2011-11-16 16:23:37 +0000
+++ b/mysql-test/suite/ndb/r/ndbinfo.result	2011-11-17 11:58:33 +0000
@@ -347,6 +347,7 @@ RESTORE
 SUMA
 THRMAN
 TRIX
+TRPMAN
 TSMAN
 desc threadstat;
 Field	Type	Null	Key	Default	Extra

=== modified file 'mysql-test/suite/ndb/r/ndbinfo_dump.result'
--- a/mysql-test/suite/ndb/r/ndbinfo_dump.result	2011-11-16 16:23:37 +0000
+++ b/mysql-test/suite/ndb/r/ndbinfo_dump.result	2011-11-17 11:58:33 +0000
@@ -1,7 +1,7 @@
 USE ndbinfo;
 select count(*) from blocks;
 count(*)
-22
+23
 select count(*) from blocks;
 count(*)
-22
+23

=== modified file 'storage/ndb/include/kernel/BlockNumbers.h'
--- a/storage/ndb/include/kernel/BlockNumbers.h	2011-11-16 16:23:37 +0000
+++ b/storage/ndb/include/kernel/BlockNumbers.h	2011-11-17 11:58:33 +0000
@@ -61,6 +61,7 @@
 #define DBINFO     0x107
 #define DBSPJ      0x108
 #define THRMAN     0x109
+#define TRPMAN     0x10A
 
 const BlockReference BACKUP_REF  = numberToRef(BACKUP, 0);
 const BlockReference DBTC_REF    = numberToRef(DBTC, 0);
@@ -84,6 +85,7 @@ const BlockReference RESTORE_REF = numbe
 const BlockReference DBINFO_REF  = numberToRef(DBINFO, 0);
 const BlockReference DBSPJ_REF  = numberToRef(DBSPJ, 0);
 const BlockReference THRMAN_REF  = numberToRef(THRMAN, 0);
+const BlockReference TRPMAN_REF  = numberToRef(TRPMAN, 0);
 
 static inline void __hide_warnings_unused_ref_vars(void) {
   // Hide annoying warnings about unused variables
@@ -94,11 +96,11 @@ static inline void __hide_warnings_unuse
   (void)DBUTIL_REF;  (void)SUMA_REF;    (void)DBTUX_REF;
   (void)TSMAN_REF;   (void)LGMAN_REF;   (void)PGMAN_REF;
   (void)RESTORE_REF; (void)DBINFO_REF;  (void)DBSPJ_REF;
-  (void)THRMAN_REF;
+  (void)THRMAN_REF;  (void)TRPMAN_REF;
 }
 
 const BlockNumber MIN_BLOCK_NO = BACKUP;
-const BlockNumber MAX_BLOCK_NO = THRMAN;
+const BlockNumber MAX_BLOCK_NO = TRPMAN;
 const BlockNumber NO_OF_BLOCKS = (MAX_BLOCK_NO - MIN_BLOCK_NO + 1);
 
 /**

=== modified file 'storage/ndb/include/kernel/GlobalSignalNumbers.h'
--- a/storage/ndb/include/kernel/GlobalSignalNumbers.h	2011-11-16 16:23:37 +0000
+++ b/storage/ndb/include/kernel/GlobalSignalNumbers.h	2011-11-17 11:58:33 +0000
@@ -592,7 +592,7 @@ extern const GlobalSignalNumber NO_OF_SI
 #define GSN_NODE_PING_REQ               461 /* distr. */
 #define GSN_NODE_PING_CONF              462 /* distr. */
 
-/* 463 unused */
+#define GSN_CANCEL_SUBSCRIPTION_REQ     463
 /* 464 unused */
 
 #define GSN_DUMP_STATE_ORD              465

=== modified file 'storage/ndb/include/kernel/signaldata/CloseComReqConf.hpp'
--- a/storage/ndb/include/kernel/signaldata/CloseComReqConf.hpp	2011-11-16 16:23:37 +0000
+++ b/storage/ndb/include/kernel/signaldata/CloseComReqConf.hpp	2011-11-17 11:58:33 +0000
@@ -35,6 +35,7 @@ class CloseComReqConf {
    */
   friend class Qmgr;
   friend class Cmvmi;
+  friend class Trpman;
 
   /**
    * For printing

=== modified file 'storage/ndb/include/kernel/signaldata/DisconnectRep.hpp'
--- a/storage/ndb/include/kernel/signaldata/DisconnectRep.hpp	2011-11-16 16:23:37 +0000
+++ b/storage/ndb/include/kernel/signaldata/DisconnectRep.hpp	2011-11-17 11:58:33 +0000
@@ -29,7 +29,8 @@ struct DisconnectRep
    * Receiver(s)
    */
   friend class Qmgr;
-  friend class Cmvmi; // Cmvmi
+  friend class Trpman;
+  friend class Cmvmi;
   friend class ClusterMgr;
 
   /**

=== modified file 'storage/ndb/include/kernel/signaldata/EnableCom.hpp'
--- a/storage/ndb/include/kernel/signaldata/EnableCom.hpp	2011-11-16 16:23:37 +0000
+++ b/storage/ndb/include/kernel/signaldata/EnableCom.hpp	2011-11-17 11:58:33 +0000
@@ -20,6 +20,7 @@
 
 class EnableComReq  {
   friend class Qmgr;
+  friend class Trpman;
   friend class Cmvmi;
 
 public:
@@ -33,6 +34,7 @@ private:
 
 class EnableComConf  {
   friend class Qmgr;
+  friend class Trpman;
   friend class Cmvmi;
 
 public:

=== modified file 'storage/ndb/include/kernel/signaldata/RouteOrd.hpp'
--- a/storage/ndb/include/kernel/signaldata/RouteOrd.hpp	2011-11-16 16:23:37 +0000
+++ b/storage/ndb/include/kernel/signaldata/RouteOrd.hpp	2011-11-17 11:58:33 +0000
@@ -25,13 +25,17 @@
 /**
  * Request to allocate node id
  */
-struct RouteOrd {
+struct RouteOrd
+{
   STATIC_CONST( SignalLength = 4 );
 
   Uint32 dstRef;
   Uint32 srcRef;
   Uint32 gsn;
-  Uint32 cnt;
+  union {
+    Uint32 cnt;
+    Uint32 from;
+  };
 };
 
 #endif

=== modified file 'storage/ndb/src/common/debugger/BlockNames.cpp'
--- a/storage/ndb/src/common/debugger/BlockNames.cpp	2011-11-16 16:23:37 +0000
+++ b/storage/ndb/src/common/debugger/BlockNames.cpp	2011-11-17 11:58:33 +0000
@@ -41,6 +41,7 @@ const BlockName BlockNames[] = {
   ,{ "DBINFO", DBINFO }
   ,{ "DBSPJ", DBSPJ }
   ,{ "THRMAN", THRMAN }
+  ,{ "TRPMAN", TRPMAN }
 };
 
 const BlockNumber NO_OF_BLOCK_NAMES = sizeof(BlockNames) / sizeof(BlockName);

=== modified file 'storage/ndb/src/kernel/SimBlockList.cpp'
--- a/storage/ndb/src/kernel/SimBlockList.cpp	2011-11-16 16:23:37 +0000
+++ b/storage/ndb/src/kernel/SimBlockList.cpp	2011-11-17 11:58:33 +0000
@@ -52,6 +52,7 @@
 #include <DbtcProxy.hpp>
 #include <DbspjProxy.hpp>
 #include <thrman.hpp>
+#include <trpman.hpp>
 #include <mt.hpp>
 
 #ifndef VM_TRACE
@@ -90,10 +91,6 @@ void * operator new (size_t sz, SIMBLOCK
 void
 SimBlockList::load(EmulatorData& data){
   noOfBlocks = NO_OF_BLOCKS;
-#define THR 1
-#ifndef THR
-  noOfBlocks--;
-#endif
   theList = new SimulatedBlock * [noOfBlocks];
   if (!theList)
   {
@@ -165,14 +162,15 @@ SimBlockList::load(EmulatorData& data){
     theList[20]  = NEW_BLOCK(Dbspj)(ctx);
   else
     theList[20]  = NEW_BLOCK(DbspjProxy)(ctx);
-#ifdef THR
   if (NdbIsMultiThreaded() == false)
     theList[21] = NEW_BLOCK(Thrman)(ctx);
   else
     theList[21] = NEW_BLOCK(ThrmanProxy)(ctx);
-
-  assert(NO_OF_BLOCKS == 22);
-#endif
+  if (NdbIsMultiThreaded() == false)
+    theList[22] = NEW_BLOCK(Trpman)(ctx);
+  else
+    theList[22] = NEW_BLOCK(TrpmanProxy)(ctx);
+  assert(NO_OF_BLOCKS == 23);
 
   // Check that all blocks could be created
   for (int i = 0; i < noOfBlocks; i++)

=== modified file 'storage/ndb/src/kernel/blocks/CMakeLists.txt'
--- a/storage/ndb/src/kernel/blocks/CMakeLists.txt	2011-11-16 16:23:37 +0000
+++ b/storage/ndb/src/kernel/blocks/CMakeLists.txt	2011-11-17 11:58:33 +0000
@@ -73,7 +73,8 @@ ADD_LIBRARY(ndbblocks STATIC
     PgmanProxy.cpp
     dbtup/DbtupClient.cpp
     ${EXTRA_SRC}
-    thrman.cpp)
+    thrman.cpp
+    trpman.cpp)
 
 MYSQL_ADD_EXECUTABLE(ndb_print_file
   print_file.cpp

=== modified file 'storage/ndb/src/kernel/blocks/Makefile.am'
--- a/storage/ndb/src/kernel/blocks/Makefile.am	2011-11-16 16:23:37 +0000
+++ b/storage/ndb/src/kernel/blocks/Makefile.am	2011-11-17 11:58:33 +0000
@@ -69,7 +69,8 @@ libblocks_a_SOURCES = tsman.cpp lgman.cp
   PgmanProxy.cpp \
   dbtup/DbtupClient.cpp \
   dbtc/DbtcProxy.cpp \
-  thrman.cpp
+  thrman.cpp \
+  trpman.cpp
 
 ndbtools_PROGRAMS = ndb_print_file
 ndb_print_file_SOURCES = print_file.cpp diskpage.cpp dbtup/tuppage.cpp

=== modified file 'storage/ndb/src/kernel/blocks/dbinfo/Dbinfo.cpp'
--- a/storage/ndb/src/kernel/blocks/dbinfo/Dbinfo.cpp	2011-11-16 16:23:37 +0000
+++ b/storage/ndb/src/kernel/blocks/dbinfo/Dbinfo.cpp	2011-11-17 11:58:33 +0000
@@ -29,7 +29,7 @@
 
 Uint32 dbinfo_blocks[] = { DBACC, DBTUP, BACKUP, DBTC, SUMA, DBUTIL,
                            TRIX, DBTUX, DBDICT, CMVMI, DBLQH, LGMAN,
-                           PGMAN, DBSPJ, THRMAN, 0};
+                           PGMAN, DBSPJ, THRMAN, TRPMAN, 0};
 
 Dbinfo::Dbinfo(Block_context& ctx) :
   SimulatedBlock(DBINFO, ctx)

=== modified file 'storage/ndb/src/kernel/blocks/trpman.cpp'
--- a/storage/ndb/src/kernel/blocks/trpman.cpp	2011-11-16 15:38:25 +0000
+++ b/storage/ndb/src/kernel/blocks/trpman.cpp	2011-11-17 11:58:33 +0000
@@ -47,7 +47,7 @@ Trpman::~Trpman()
 BLOCK_FUNCTIONS(Trpman)
 
 #ifdef ERROR_INSERT
-NodeBitmask c_error_9000_nodes_mask;
+static NodeBitmask c_error_9000_nodes_mask;
 extern Uint32 MAX_RECEIVED_SIGNALS;
 #endif
 

=== modified file 'storage/ndb/src/kernel/vm/mt.cpp'
--- a/storage/ndb/src/kernel/vm/mt.cpp	2011-11-16 16:23:37 +0000
+++ b/storage/ndb/src/kernel/vm/mt.cpp	2011-11-17 11:58:33 +0000
@@ -2627,6 +2627,7 @@ mt_init_thr_map()
   add_thr_map(DBINFO, 0, thr_LOCAL);
   add_thr_map(DBSPJ, 0, thr_GLOBAL);
   add_thr_map(THRMAN, 0, thr_GLOBAL);
+  add_thr_map(TRPMAN, 0, thr_GLOBAL);
 }
 
 Uint32
@@ -2650,6 +2651,8 @@ mt_get_instance_count(Uint32 block)
     break;
   case THRMAN:
     return num_threads;
+  case TRPMAN:
+    return 1;
   default:
     require(false);
   }
@@ -2688,6 +2691,9 @@ mt_add_thr_map(Uint32 block, Uint32 inst
   case THRMAN:
     thr_no = instance - 1;
     break;
+  case TRPMAN:
+    thr_no = receiver_thread_no;
+    break;
   default:
     require(false);
   }

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