set set "CHUNK_SZ" for fragmented signal to real value

added API_TRACE code
removed old implementation of fragmented signal
parent af5f0b95
...@@ -835,7 +835,7 @@ TransporterFacade::sendSignalUnCond(NdbApiSignal * aSignal, NodeId aNode){ ...@@ -835,7 +835,7 @@ TransporterFacade::sendSignalUnCond(NdbApiSignal * aSignal, NodeId aNode){
return (ss == SEND_OK ? 0 : -1); return (ss == SEND_OK ? 0 : -1);
} }
#define CHUNK_SZ NDB_SECTION_SEGMENT_SZ*1 #define CHUNK_SZ NDB_SECTION_SEGMENT_SZ*64 // related to MAX_MESSAGE_SIZE
int int
TransporterFacade::sendFragmentedSignal(NdbApiSignal* aSignal, NodeId aNode, TransporterFacade::sendFragmentedSignal(NdbApiSignal* aSignal, NodeId aNode,
LinearSectionPtr ptr[3], Uint32 secs) LinearSectionPtr ptr[3], Uint32 secs)
...@@ -843,6 +843,19 @@ TransporterFacade::sendFragmentedSignal(NdbApiSignal* aSignal, NodeId aNode, ...@@ -843,6 +843,19 @@ TransporterFacade::sendFragmentedSignal(NdbApiSignal* aSignal, NodeId aNode,
if(getIsNodeSendable(aNode) != true) if(getIsNodeSendable(aNode) != true)
return -1; return -1;
#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);
aSignal->theSendersBlockRef = tmp;
}
#endif
NdbApiSignal tmp_signal(*(SignalHeader*)aSignal); NdbApiSignal tmp_signal(*(SignalHeader*)aSignal);
LinearSectionPtr tmp_ptr[3]; LinearSectionPtr tmp_ptr[3];
Uint32 unique_id= m_fragmented_signal_id++; // next unique id Uint32 unique_id= m_fragmented_signal_id++; // next unique id
...@@ -942,71 +955,6 @@ TransporterFacade::sendFragmentedSignal(NdbApiSignal* aSignal, NodeId aNode, ...@@ -942,71 +955,6 @@ TransporterFacade::sendFragmentedSignal(NdbApiSignal* aSignal, NodeId aNode,
return ret; return ret;
} }
#if 0
int
TransporterFacade::sendFragmentedSignal(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;
}
#endif
int
TransporterFacade::sendFragmentedSignalUnCond(NdbApiSignal* aSignal,
NodeId aNode,
LinearSectionPtr ptr[3],
Uint32 secs){
aSignal->m_noOfSections = secs;
#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);
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);
}
/****************************************************************************** /******************************************************************************
* CONNECTION METHODS Etc * CONNECTION METHODS Etc
******************************************************************************/ ******************************************************************************/
......
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