diff options
author | unknown <mronstrom@mysql.com> | 2004-08-06 20:22:34 +0200 |
---|---|---|
committer | unknown <mronstrom@mysql.com> | 2004-08-06 20:22:34 +0200 |
commit | 20e8d38bd05e9377fab8673300b44c8deed056f2 (patch) | |
tree | 50e677977656ff11366d6c2cbde8d370cb87c45b /ndb | |
parent | a2b6166e0d8e0782318d8c258234013163ae133e (diff) | |
download | mariadb-git-20e8d38bd05e9377fab8673300b44c8deed056f2.tar.gz |
Jammed Qmgr a bit more
Fixed Bug #4935, initialise before connecting again
Some lines removed
Diffstat (limited to 'ndb')
-rw-r--r-- | ndb/src/common/mgmcommon/ConfigInfo.cpp | 2 | ||||
-rw-r--r-- | ndb/src/common/mgmcommon/IPCConfig.cpp | 1 | ||||
-rw-r--r-- | ndb/src/common/transporter/Transporter.cpp | 3 | ||||
-rw-r--r-- | ndb/src/common/transporter/TransporterRegistry.cpp | 3 | ||||
-rw-r--r-- | ndb/src/common/util/SocketClient.cpp | 10 | ||||
-rw-r--r-- | ndb/src/common/util/SocketServer.cpp | 1 | ||||
-rw-r--r-- | ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp | 1 | ||||
-rw-r--r-- | ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp | 17 | ||||
-rw-r--r-- | ndb/src/kernel/blocks/qmgr/QmgrMain.cpp | 3 |
9 files changed, 21 insertions, 20 deletions
diff --git a/ndb/src/common/mgmcommon/ConfigInfo.cpp b/ndb/src/common/mgmcommon/ConfigInfo.cpp index 540c34150a9..1a602fb4e88 100644 --- a/ndb/src/common/mgmcommon/ConfigInfo.cpp +++ b/ndb/src/common/mgmcommon/ConfigInfo.cpp @@ -2585,7 +2585,6 @@ fixPortNumber(InitConfigFileParser::Context & ctx, const char * data){ Uint32 id1= 0, id2= 0; require(ctx.m_currentSection->get("NodeId1", &id1)); require(ctx.m_currentSection->get("NodeId2", &id2)); - id1 = id1 < id2 ? id1 : id2; const Properties * node; @@ -2618,7 +2617,6 @@ fixPortNumber(InitConfigFileParser::Context & ctx, const char * data){ } ctx.m_userProperties.put("ServerPortBase", base); } - port= base + adder; ctx.m_userProperties.put("ServerPort_", id1, port); } diff --git a/ndb/src/common/mgmcommon/IPCConfig.cpp b/ndb/src/common/mgmcommon/IPCConfig.cpp index a8536bf4fa7..a76c541f3f6 100644 --- a/ndb/src/common/mgmcommon/IPCConfig.cpp +++ b/ndb/src/common/mgmcommon/IPCConfig.cpp @@ -445,7 +445,6 @@ IPCConfig::configureTransporters(Uint32 nodeId, if(iter.get(CFG_TCP_RECEIVE_BUFFER_SIZE, &conf.maxReceiveSize)) break; conf.port= tmp_server_port; - const char * proxy; if (!iter.get(CFG_TCP_PROXY, &proxy)) { if (strlen(proxy) > 0 && nodeId2 == nodeId) { diff --git a/ndb/src/common/transporter/Transporter.cpp b/ndb/src/common/transporter/Transporter.cpp index cfd75eb6c5e..2c8a43fff1b 100644 --- a/ndb/src/common/transporter/Transporter.cpp +++ b/ndb/src/common/transporter/Transporter.cpp @@ -93,7 +93,6 @@ bool Transporter::connect_client() { if(m_connected) return true; - NDB_SOCKET_TYPE sockfd = m_socket_client->connect(); if (sockfd < 0) @@ -102,7 +101,6 @@ Transporter::connect_client() { // send info about own id SocketOutputStream s_output(sockfd); s_output.println("%d", localNodeId); - // get remote id int nodeId; SocketInputStream s_input(sockfd); @@ -115,7 +113,6 @@ Transporter::connect_client() { NDB_CLOSE_SOCKET(sockfd); return false; } - bool res = connect_client_impl(sockfd); if(res){ m_connected = true; diff --git a/ndb/src/common/transporter/TransporterRegistry.cpp b/ndb/src/common/transporter/TransporterRegistry.cpp index 3d42c40f720..a66b6db184e 100644 --- a/ndb/src/common/transporter/TransporterRegistry.cpp +++ b/ndb/src/common/transporter/TransporterRegistry.cpp @@ -200,8 +200,7 @@ TransporterRegistry::createTransporter(TCP_TransporterConfiguration *config) { if(theTransporters[config->remoteNodeId] != NULL) return false; - - + TCP_Transporter * t = new TCP_Transporter(*this, config->sendBufferSize, config->maxReceiveSize, diff --git a/ndb/src/common/util/SocketClient.cpp b/ndb/src/common/util/SocketClient.cpp index b7769633875..ec837babc24 100644 --- a/ndb/src/common/util/SocketClient.cpp +++ b/ndb/src/common/util/SocketClient.cpp @@ -70,19 +70,21 @@ SocketClient::connect() return -1; } } - const int r = ::connect(m_sockfd, (struct sockaddr*) &m_servaddr, sizeof(m_servaddr)); - if (r == -1) + if (r == -1) { + NDB_CLOSE_SOCKET(m_sockfd); + m_sockfd= -1; return -1; + } - if (m_auth) + if (m_auth) { if (!m_auth->client_authenticate(m_sockfd)) { NDB_CLOSE_SOCKET(m_sockfd); m_sockfd= -1; return -1; } - + } NDB_SOCKET_TYPE sockfd= m_sockfd; m_sockfd= -1; diff --git a/ndb/src/common/util/SocketServer.cpp b/ndb/src/common/util/SocketServer.cpp index 67cbf8aba4a..256e5ce791b 100644 --- a/ndb/src/common/util/SocketServer.cpp +++ b/ndb/src/common/util/SocketServer.cpp @@ -146,7 +146,6 @@ SocketServer::doAccept(){ ServiceInstance & si = m_services[i]; if(FD_ISSET(si.m_socket, &readSet)){ - NDB_SOCKET_TYPE childSock = accept(si.m_socket, 0, 0); if(childSock == NDB_INVALID_SOCKET){ continue; diff --git a/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp b/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp index 176b9590c60..750cae1eaad 100644 --- a/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp +++ b/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp @@ -480,7 +480,6 @@ void Cmvmi::execDISCONNECT_REP(Signal *signal) void Cmvmi::execCONNECT_REP(Signal *signal){ const Uint32 hostId = signal->theData[0]; - jamEntry(); const NodeInfo::NodeType type = (NodeInfo::NodeType)getNodeInfo(hostId).m_type; diff --git a/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp b/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp index 91776cd7c03..4b2fcfe0c8c 100644 --- a/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp +++ b/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp @@ -554,11 +554,13 @@ Ndbcntr::execCNTR_START_REP(Signal* signal){ } if(cmasterNodeId != getOwnNodeId()){ + jam(); c_start.reset(); return; } if(c_start.m_waiting.isclear()){ + jam(); c_start.reset(); return; } @@ -597,6 +599,7 @@ Ndbcntr::execCNTR_START_REQ(Signal * signal){ ndbrequire(false); case NodeState::SL_STARTING: case NodeState::SL_STARTED: + jam(); break; case NodeState::SL_STOPPING_1: @@ -616,9 +619,11 @@ Ndbcntr::execCNTR_START_REQ(Signal * signal){ c_start.m_waiting.set(nodeId); switch(st){ case NodeState::ST_INITIAL_START: + jam(); c_start.m_withoutLog.set(nodeId); break; case NodeState::ST_SYSTEM_RESTART: + jam(); c_start.m_withLog.set(nodeId); if(starting && lastGci > c_start.m_lastGci){ jam(); @@ -631,6 +636,7 @@ Ndbcntr::execCNTR_START_REQ(Signal * signal){ return; } if(starting){ + jam(); Uint32 i = c_start.m_logNodesCount++; c_start.m_logNodes[i].m_nodeId = nodeId; c_start.m_logNodes[i].m_lastGci = req->lastGci; @@ -652,11 +658,12 @@ Ndbcntr::execCNTR_START_REQ(Signal * signal){ } if(starting){ + jam(); trySystemRestart(signal); } else { + jam(); startWaitingNodes(signal); } - return; } @@ -670,6 +677,7 @@ Ndbcntr::startWaitingNodes(Signal * signal){ NodeState::StartType nrType = NodeState::ST_NODE_RESTART; if(c_start.m_withoutLog.get(nodeId)){ + jam(); nrType = NodeState::ST_INITIAL_NODE_RESTART; } @@ -706,6 +714,7 @@ Ndbcntr::startWaitingNodes(Signal * signal){ char buf[100]; if(!c_start.m_withLog.isclear()){ + jam(); ndbout_c("Starting nodes w/ log: %s", c_start.m_withLog.getText(buf)); NodeReceiverGroup rg(NDBCNTR, c_start.m_withLog); @@ -716,6 +725,7 @@ Ndbcntr::startWaitingNodes(Signal * signal){ } if(!c_start.m_withoutLog.isclear()){ + jam(); ndbout_c("Starting nodes wo/ log: %s", c_start.m_withoutLog.getText(buf)); NodeReceiverGroup rg(NDBCNTR, c_start.m_withoutLog); conf->startType = NodeState::ST_INITIAL_NODE_RESTART; @@ -777,6 +787,7 @@ Ndbcntr::trySystemRestart(Signal* signal){ jam(); return false; } + jam(); srType = NodeState::ST_INITIAL_START; c_start.m_starting = c_start.m_withoutLog; // Used for starting... c_start.m_withoutLog.clear(); @@ -793,13 +804,11 @@ Ndbcntr::trySystemRestart(Signal* signal){ // If we lose with all nodes, then we're in trouble ndbrequire(!allNodes); return false; - break; case CheckNodeGroups::Partitioning: jam(); bool allowPartition = (c_start.m_startPartitionedTimeout != (Uint64)~0); if(allNodes){ - jam(); if(allowPartition){ jam(); break; @@ -1043,8 +1052,10 @@ void Ndbcntr::ph5ALab(Signal* signal) return; case NodeState::ST_NODE_RESTART: case NodeState::ST_INITIAL_NODE_RESTART: + jam(); break; case NodeState::ST_ILLEGAL_TYPE: + jam(); break; } ndbrequire(false); diff --git a/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp b/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp index 9bf3bf06fa4..f01098115a6 100644 --- a/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp +++ b/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp @@ -258,7 +258,6 @@ void Qmgr::execCONNECT_REP(Signal* signal) { const Uint32 nodeId = signal->theData[0]; c_connectedNodes.set(nodeId); - NodeRecPtr nodePtr; nodePtr.i = getOwnNodeId(); ptrCheckGuard(nodePtr, MAX_NODES, nodeRec); @@ -679,7 +678,6 @@ void Qmgr::execCM_REGREF(Signal* signal) UintR TaddNodeno = signal->theData[1]; UintR TrefuseReason = signal->theData[2]; Uint32 candidate = signal->theData[3]; - DEBUG_START3(signal, TrefuseReason); if(candidate != cpresidentCandidate){ @@ -768,7 +766,6 @@ void Qmgr::execCM_REGREF(Signal* signal) Uint64 now = NdbTick_CurrentMillisecond(); if((c_regReqReqRecv == cnoOfNodes) || now > c_stopElectionTime){ jam(); - electionWon(); sendSttorryLab(signal); |