Commit 166671cc authored by unknown's avatar unknown

always let traffic through to api cluster manager in transporter

    print some info event on api connects with wrong versions


BitKeeper/deleted/.del-Makefile.am~91c159ff4011609:
  Delete: ndb/tools/restore/Makefile.am
ndb/src/common/transporter/TransporterRegistry.cpp:
  let traffic through to api cluster manager as well
ndb/src/kernel/blocks/qmgr/QmgrMain.cpp:
  print some info event on api connects with wrong versions
parent c7bc64ab
...@@ -467,8 +467,9 @@ TransporterRegistry::prepareSend(const SignalHeader * const signalHeader, ...@@ -467,8 +467,9 @@ TransporterRegistry::prepareSend(const SignalHeader * const signalHeader,
Transporter *t = theTransporters[nodeId]; Transporter *t = theTransporters[nodeId];
if(t != NULL && if(t != NULL &&
(((ioStates[nodeId] != HaltOutput) && (ioStates[nodeId] != HaltIO)) || (((ioStates[nodeId] != HaltOutput) && (ioStates[nodeId] != HaltIO)) ||
(signalHeader->theReceiversBlockNumber == 252))) { ((signalHeader->theReceiversBlockNumber == 252) ||
(signalHeader->theReceiversBlockNumber == 4002)))) {
if(t->isConnected()){ if(t->isConnected()){
Uint32 lenBytes = t->m_packer.getMessageLength(signalHeader, ptr); Uint32 lenBytes = t->m_packer.getMessageLength(signalHeader, ptr);
if(lenBytes <= MAX_MESSAGE_SIZE){ if(lenBytes <= MAX_MESSAGE_SIZE){
...@@ -538,8 +539,9 @@ TransporterRegistry::prepareSend(const SignalHeader * const signalHeader, ...@@ -538,8 +539,9 @@ TransporterRegistry::prepareSend(const SignalHeader * const signalHeader,
Transporter *t = theTransporters[nodeId]; Transporter *t = theTransporters[nodeId];
if(t != NULL && if(t != NULL &&
(((ioStates[nodeId] != HaltOutput) && (ioStates[nodeId] != HaltIO)) || (((ioStates[nodeId] != HaltOutput) && (ioStates[nodeId] != HaltIO)) ||
(signalHeader->theReceiversBlockNumber == 252))) { ((signalHeader->theReceiversBlockNumber == 252)||
(signalHeader->theReceiversBlockNumber == 4002)))) {
if(t->isConnected()){ if(t->isConnected()){
Uint32 lenBytes = t->m_packer.getMessageLength(signalHeader, ptr); Uint32 lenBytes = t->m_packer.getMessageLength(signalHeader, ptr);
if(lenBytes <= MAX_MESSAGE_SIZE){ if(lenBytes <= MAX_MESSAGE_SIZE){
...@@ -550,7 +552,7 @@ TransporterRegistry::prepareSend(const SignalHeader * const signalHeader, ...@@ -550,7 +552,7 @@ TransporterRegistry::prepareSend(const SignalHeader * const signalHeader,
return SEND_OK; return SEND_OK;
} }
/** /**
* @note: on linux/i386 the granularity is 10ms * @note: on linux/i386 the granularity is 10ms
* so sleepTime = 2 generates a 10 ms sleep. * so sleepTime = 2 generates a 10 ms sleep.
......
...@@ -1934,17 +1934,27 @@ void Qmgr::execAPI_REGREQ(Signal* signal) ...@@ -1934,17 +1934,27 @@ void Qmgr::execAPI_REGREQ(Signal* signal)
switch(getNodeInfo(apiNodePtr.i).getType()){ switch(getNodeInfo(apiNodePtr.i).getType()){
case NodeInfo::API: case NodeInfo::API:
compatability_check = ndbCompatible_ndb_api(NDB_VERSION, version); compatability_check = ndbCompatible_ndb_api(NDB_VERSION, version);
if (!compatability_check)
infoEvent("Connection attempt from api or mysqld id=%d with %s "
"incompatible with %s", apiNodePtr.i,
getVersionString(version,""), NDB_VERSION_STRING);
break; break;
case NodeInfo::MGM: case NodeInfo::MGM:
compatability_check = ndbCompatible_ndb_mgmt(NDB_VERSION, version); compatability_check = ndbCompatible_ndb_mgmt(NDB_VERSION, version);
if (!compatability_check)
infoEvent("Connection attempt from management server id=%d with %s "
"incompatible with %s", apiNodePtr.i,
getVersionString(version,""), NDB_VERSION_STRING);
break; break;
case NodeInfo::REP: case NodeInfo::REP:
compatability_check = ndbCompatible_ndb_api(NDB_VERSION, version); // compatability_check = ndbCompatible_ndb_api(NDB_VERSION, version);
break; // break;
case NodeInfo::DB: case NodeInfo::DB:
case NodeInfo::INVALID: case NodeInfo::INVALID:
default: default:
sendApiRegRef(signal, ref, ApiRegRef::WrongType); sendApiRegRef(signal, ref, ApiRegRef::WrongType);
infoEvent("Invalid connection attempt with type %d",
getNodeInfo(apiNodePtr.i).getType());
return; return;
} }
......
ndbtools_PROGRAMS = ndb_restore
ndb_restore_SOURCES = main.cpp consumer.cpp consumer_restore.cpp consumer_printer.cpp Restore.cpp
LDADD_LOC = \
$(top_builddir)/ndb/src/libndbclient.la \
$(top_builddir)/dbug/libdbug.a \
$(top_builddir)/mysys/libmysys.a \
$(top_builddir)/strings/libmystrings.a @NDB_SCI_LIBS@
include $(top_srcdir)/ndb/config/common.mk.am
INCLUDES += -I.. -I$(top_srcdir)/include -I$(top_srcdir)/ndb/include -I$(top_srcdir)/ndb/src/ndbapi -I$(top_srcdir)/ndb/include/ndbapi -I$(top_srcdir)/ndb/include/util -I$(top_srcdir)/ndb/include/portlib -I$(top_srcdir)/ndb/include/kernel
ndb_restore_LDFLAGS = @ndb_bin_am_ldflags@
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment