Commit fe37a147 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 6c4f9f5d
......@@ -467,8 +467,9 @@ TransporterRegistry::prepareSend(const SignalHeader * const signalHeader,
Transporter *t = theTransporters[nodeId];
if(t != NULL &&
(((ioStates[nodeId] != HaltOutput) && (ioStates[nodeId] != HaltIO)) ||
(signalHeader->theReceiversBlockNumber == 252))) {
((signalHeader->theReceiversBlockNumber == 252) ||
(signalHeader->theReceiversBlockNumber == 4002)))) {
if(t->isConnected()){
Uint32 lenBytes = t->m_packer.getMessageLength(signalHeader, ptr);
if(lenBytes <= MAX_MESSAGE_SIZE){
......@@ -538,8 +539,9 @@ TransporterRegistry::prepareSend(const SignalHeader * const signalHeader,
Transporter *t = theTransporters[nodeId];
if(t != NULL &&
(((ioStates[nodeId] != HaltOutput) && (ioStates[nodeId] != HaltIO)) ||
(signalHeader->theReceiversBlockNumber == 252))) {
((signalHeader->theReceiversBlockNumber == 252)||
(signalHeader->theReceiversBlockNumber == 4002)))) {
if(t->isConnected()){
Uint32 lenBytes = t->m_packer.getMessageLength(signalHeader, ptr);
if(lenBytes <= MAX_MESSAGE_SIZE){
......@@ -550,7 +552,7 @@ TransporterRegistry::prepareSend(const SignalHeader * const signalHeader,
return SEND_OK;
}
/**
* @note: on linux/i386 the granularity is 10ms
* so sleepTime = 2 generates a 10 ms sleep.
......
......@@ -1934,17 +1934,27 @@ void Qmgr::execAPI_REGREQ(Signal* signal)
switch(getNodeInfo(apiNodePtr.i).getType()){
case NodeInfo::API:
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;
case NodeInfo::MGM:
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;
case NodeInfo::REP:
compatability_check = ndbCompatible_ndb_api(NDB_VERSION, version);
break;
// compatability_check = ndbCompatible_ndb_api(NDB_VERSION, version);
// break;
case NodeInfo::DB:
case NodeInfo::INVALID:
default:
sendApiRegRef(signal, ref, ApiRegRef::WrongType);
infoEvent("Invalid connection attempt with type %d",
getNodeInfo(apiNodePtr.i).getType());
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