List:Commits« Previous MessageNext Message »
From:Mikael Ronstrom Date:December 20 2011 12:29pm
Subject:bzr push into mysql-5.5-cluster-7.2 branch (mikael.ronstrom:3662 to 3664)
View as plain text  
 3664 Mikael Ronstrom	2011-12-20
      Final fixes to get ndbmtd working for multiple receive threads

    modified:
      mysql-test/suite/ndb/r/ndb_basic.result
      storage/ndb/src/kernel/blocks/trpman.cpp
 3663 Mikael Ronstrom	2011-12-20
      Fixed a number of issues with multiple receive threads

    modified:
      storage/ndb/src/common/transporter/TransporterRegistry.cpp
      storage/ndb/src/kernel/blocks/trpman.cpp
      storage/ndb/src/kernel/blocks/trpman.hpp
 3662 Mikael Ronstrom	2011-12-19 [merge]
      merge

    renamed:
      storage/ndb/clusterj/clusterj-test/src/main/java/testsuite/clusterj/DbugTest.java.not_yet => storage/ndb/clusterj/clusterj-test/src/main/java/testsuite/clusterj/DbugTest.java
    modified:
      sql/ha_ndb_index_stat.cc
      sql/ha_ndb_index_stat.h
      sql/ha_ndbcluster.cc
      storage/ndb/clusterj/clusterj-tie/src/main/java/com/mysql/clusterj/tie/ClusterConnectionImpl.java
      storage/ndb/clusterj/clusterj-tie/src/main/java/com/mysql/clusterj/tie/ClusterConnectionServiceImpl.java
      storage/ndb/clusterj/clusterj-tie/src/main/java/com/mysql/clusterj/tie/DbugImpl.java
      storage/ndb/include/ndbapi/NdbIndexStat.hpp
      storage/ndb/src/kernel/blocks/LocalProxy.cpp
      storage/ndb/src/kernel/blocks/LocalProxy.hpp
      storage/ndb/src/ndbapi/NdbIndexStat.cpp
      storage/ndb/src/ndbapi/NdbIndexStatImpl.cpp
      storage/ndb/src/ndbapi/NdbIndexStatImpl.hpp
      storage/ndb/src/ndbapi/ndberror.c
      storage/ndb/clusterj/clusterj-test/src/main/java/testsuite/clusterj/DbugTest.java
=== modified file 'mysql-test/suite/ndb/r/ndb_basic.result'
--- a/mysql-test/suite/ndb/r/ndb_basic.result	revid:mikael.ronstrom@stripped
+++ b/mysql-test/suite/ndb/r/ndb_basic.result	revid:mikael.ronstrom@stripped
@@ -616,8 +616,6 @@ create table t1
 primary key (a,b,c,d)) 
 engine=ndb
 max_rows=800000000;
-Warnings:
-Warning	1105	Ndb might have problems storing the max amount of rows specified
 insert into t1 values
 (1,2,3,4),(2,3,4,5),(3,4,5,6),
 (3,2,3,4),(1,3,4,5),(2,4,5,6),

=== modified file 'storage/ndb/src/common/transporter/TransporterRegistry.cpp'
--- a/storage/ndb/src/common/transporter/TransporterRegistry.cpp	revid:mikael.ronstrom@stripped
+++ b/storage/ndb/src/common/transporter/TransporterRegistry.cpp	revid:mikael.ronstrom@stripped
@@ -49,7 +49,6 @@ extern int g_ndb_shm_signum;
 
 #include <EventLogger.hpp>
 
-#define DBUG_PRINT(a,b) ndbout_c b
 extern EventLogger * g_eventLogger;
 
 struct in_addr
@@ -1504,7 +1503,7 @@ void
 TransporterRegistry::printState(){
   ndbout << "-- TransporterRegistry -- " << endl << endl
 	 << "Transporters = " << nTransporters << endl;
-  for(int i = 0; i<maxTransporters; i++)
+  for(Uint32 i = 0; i<maxTransporters; i++)
     if(theTransporters[i] != NULL){
       const NodeId remoteNodeId = theTransporters[i]->getRemoteNodeId();
       ndbout << "Transporter: " << remoteNodeId 
@@ -1701,8 +1700,10 @@ TransporterRegistry::report_disconnect(N
 #endif
 
   performStates[node_id] = DISCONNECTED;
-  for (Uint32 i = 0; i < MAX_NDBMT_RECEIVE_THREADS; i++)
-    m_has_data_transporters_ptr[i]->clear(node_id);
+  Uint32 recv_thread_id = getReceiveThreadId(node_id);
+  assert(recv_thread_id < MAX_NDBMT_RECEIVE_THREADS &&
+         m_has_data_transporters_ptr[recv_thread_id]);
+  m_has_data_transporters_ptr[recv_thread_id]->clear(node_id);
   callbackObj->reportDisconnect(node_id, errnum);
   DBUG_VOID_RETURN;
 }

=== modified file 'storage/ndb/src/kernel/blocks/trpman.cpp'
--- a/storage/ndb/src/kernel/blocks/trpman.cpp	revid:mikael.ronstrom@stripped
+++ b/storage/ndb/src/kernel/blocks/trpman.cpp	revid:mikael.ronstrom@stripped
@@ -29,6 +29,7 @@ Trpman::Trpman(Block_context & ctx, Uint
   BLOCK_CONSTRUCTOR(Trpman);
 
   addRecSignal(GSN_CLOSE_COMREQ, &Trpman::execCLOSE_COMREQ);
+  addRecSignal(GSN_CLOSE_COMCONF, &Trpman::execCLOSE_COMCONF);
   addRecSignal(GSN_OPEN_COMREQ, &Trpman::execOPEN_COMREQ);
   addRecSignal(GSN_ENABLE_COMREQ, &Trpman::execENABLE_COMREQ);
   addRecSignal(GSN_DISCONNECT_REP, &Trpman::execDISCONNECT_REP);
@@ -220,6 +221,18 @@ Trpman::execCLOSE_COMREQ(Signal* signal)
   }
 }
 
+/*
+  We need to implement CLOSE_COMCONF signal for the non-multithreaded
+  case where message should go to QMGR, for multithreaded case it
+  needs to pass through TRPMAN proxy on its way back.
+*/
+void
+Trpman::execCLOSE_COMCONF(Signal *signal)
+{
+  jamEntry();
+  sendSignal(QMGR_REF, GSN_CLOSE_COMCONF, signal, 19, JBA);
+}
+
 void
 Trpman::execENABLE_COMREQ(Signal* signal)
 {
@@ -638,7 +651,7 @@ void
 TrpmanProxy::execOPEN_COMREQ(Signal* signal)
 {
   jamEntry();
-  Ss_OPEN_COMREQ& ss = ssSeize<Ss_OPEN_COMREQ>(1);
+  Ss_OPEN_COMREQ& ss = ssSeize<Ss_OPEN_COMREQ>();
 
   ss.save_ref = signal->theData[0];
   ss.data1 = signal->theData[1];
@@ -684,7 +697,7 @@ void
 TrpmanProxy::execCLOSE_COMREQ(Signal* signal)
 {
   jamEntry();
-  Ss_CLOSE_COMREQ& ss = ssSeize<Ss_CLOSE_COMREQ>(1);
+  Ss_CLOSE_COMREQ& ss = ssSeize<Ss_CLOSE_COMREQ>();
   const CloseComReqConf* req = (const CloseComReqConf*)signal->getDataPtr();
   ss.m_req = *req;
   sendREQ(signal, ss);
@@ -737,7 +750,7 @@ void
 TrpmanProxy::execENABLE_COMREQ(Signal* signal)
 {
   jamEntry();
-  Ss_ENABLE_COMREQ& ss = ssSeize<Ss_ENABLE_COMREQ>(1);
+  Ss_ENABLE_COMREQ& ss = ssSeize<Ss_ENABLE_COMREQ>();
   const EnableComReq* req = (const EnableComReq*)signal->getDataPtr();
   ss.m_req = *req;
   sendREQ(signal, ss);

=== modified file 'storage/ndb/src/kernel/blocks/trpman.hpp'
--- a/storage/ndb/src/kernel/blocks/trpman.hpp	revid:mikael.ronstrom@stripped
+++ b/storage/ndb/src/kernel/blocks/trpman.hpp	revid:mikael.ronstrom@stripped
@@ -32,6 +32,7 @@ public:
   BLOCK_DEFINES(Trpman);
 
   void execCLOSE_COMREQ(Signal *signal);
+  void execCLOSE_COMCONF(Signal *signal);
   void execOPEN_COMREQ(Signal *signal);
   void execENABLE_COMREQ(Signal *signal);
   void execDISCONNECT_REP(Signal *signal);

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.5-cluster-7.2 branch (mikael.ronstrom:3662 to 3664) Mikael Ronstrom21 Dec