Commit e3ac81be authored by unknown's avatar unknown

scan should not send fragmented signal

    use new sendSignal method instead
    new send signal method which sends segments
    remove unused method sendFragmentedSignalUnCond


ndb/src/ndbapi/NdbScanOperation.cpp:
  scan should not send fragmented signal
  use new sendSignal method instead
ndb/src/ndbapi/TransporterFacade.cpp:
  new send signal method which sends segments
ndb/src/ndbapi/TransporterFacade.hpp:
  new send signal method which sends segments
  remove unused method sendFragmentedSignalUnCond
parent 51ad907d
...@@ -612,7 +612,7 @@ NdbScanOperation::send_next_scan(Uint32 cnt, bool stopScanFlag){ ...@@ -612,7 +612,7 @@ NdbScanOperation::send_next_scan(Uint32 cnt, bool stopScanFlag){
LinearSectionPtr ptr[3]; LinearSectionPtr ptr[3];
ptr[0].p = prep_array; ptr[0].p = prep_array;
ptr[0].sz = cnt; ptr[0].sz = cnt;
ret = tp->sendFragmentedSignal(&tSignal, nodeId, ptr, 1); ret = tp->sendSignal(&tSignal, nodeId, ptr, 1);
} else { } else {
tSignal.setLength(4+cnt); tSignal.setLength(4+cnt);
ret = tp->sendSignal(&tSignal, nodeId); ret = tp->sendSignal(&tSignal, nodeId);
...@@ -803,7 +803,7 @@ NdbScanOperation::doSendScan(int aProcessorId) ...@@ -803,7 +803,7 @@ NdbScanOperation::doSendScan(int aProcessorId)
LinearSectionPtr ptr[3]; LinearSectionPtr ptr[3];
ptr[0].p = m_prepared_receivers; ptr[0].p = m_prepared_receivers;
ptr[0].sz = theParallelism; ptr[0].sz = theParallelism;
if (tp->sendFragmentedSignal(tSignal, aProcessorId, ptr, 1) == -1) { if (tp->sendSignal(tSignal, aProcessorId, ptr, 1) == -1) {
setErrorCode(4002); setErrorCode(4002);
return -1; return -1;
} }
......
...@@ -955,6 +955,38 @@ TransporterFacade::sendFragmentedSignal(NdbApiSignal* aSignal, NodeId aNode, ...@@ -955,6 +955,38 @@ TransporterFacade::sendFragmentedSignal(NdbApiSignal* aSignal, NodeId aNode,
return ret; return ret;
} }
int
TransporterFacade::sendSignal(NdbApiSignal* aSignal, NodeId aNode,
LinearSectionPtr ptr[3], Uint32 secs){
aSignal->m_noOfSections = secs;
if(getIsNodeSendable(aNode) == true){
#ifdef API_TRACE
if(setSignalLog() && TRACE_GSN(aSignal->theVerId_signalNumber)){
Uint32 tmp = aSignal->theSendersBlockRef;
aSignal->theSendersBlockRef = numberToRef(tmp, theOwnId);
signalLogger.sendSignal(* aSignal,
1,
aSignal->getDataPtrSend(),
aNode,
ptr, secs);
signalLogger.flushSignalLog();
aSignal->theSendersBlockRef = tmp;
}
#endif
SendStatus ss = theTransporterRegistry->prepareSend
(aSignal,
1, // JBB
aSignal->getDataPtrSend(),
aNode,
ptr);
assert(ss != SEND_MESSAGE_TOO_BIG);
aSignal->m_noOfSections = 0;
return (ss == SEND_OK ? 0 : -1);
}
aSignal->m_noOfSections = 0;
return -1;
}
/****************************************************************************** /******************************************************************************
* CONNECTION METHODS Etc * CONNECTION METHODS Etc
******************************************************************************/ ******************************************************************************/
......
...@@ -69,14 +69,11 @@ public: ...@@ -69,14 +69,11 @@ public:
// Only sends to nodes which are alive // Only sends to nodes which are alive
int sendSignal(NdbApiSignal * signal, NodeId nodeId); int sendSignal(NdbApiSignal * signal, NodeId nodeId);
int sendSignal(NdbApiSignal*, NodeId,
LinearSectionPtr ptr[3], Uint32 secs);
int sendFragmentedSignal(NdbApiSignal*, NodeId, int sendFragmentedSignal(NdbApiSignal*, NodeId,
LinearSectionPtr ptr[3], Uint32 secs); LinearSectionPtr ptr[3], Uint32 secs);
//Dirrrrty
int sendFragmentedSignalUnCond(NdbApiSignal*, NodeId,
LinearSectionPtr ptr[3], Uint32 secs);
// Is node available for running transactions // Is node available for running transactions
bool get_node_alive(NodeId nodeId) const; bool get_node_alive(NodeId nodeId) const;
bool get_node_stopping(NodeId nodeId) const; bool get_node_stopping(NodeId nodeId) const;
......
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