3956 Mikael Ronstrom 2012-07-05
fix
modified:
storage/ndb/src/ndbapi/TransporterFacade.cpp
3955 Mikael Ronstrom 2012-07-05
Added one more possible for_each signal
modified:
storage/ndb/src/ndbapi/TransporterFacade.cpp
3954 Mikael Ronstrom 2012-07-05
fix
modified:
storage/ndb/src/ndbapi/TransporterFacade.cpp
3953 Mikael Ronstrom 2012-07-05
A fix of trp_deliver_signal for receiver thread client + introduction of hacky lock CPU of receive thread
modified:
storage/ndb/src/ndbapi/TransporterFacade.cpp
3952 Mikael Ronstrom 2012-07-04
Step 3 to make receive thread for NDB API: Make receive thread call do_poll and be constant poll owner
modified:
storage/ndb/src/ndbapi/TransporterFacade.cpp
storage/ndb/src/ndbapi/TransporterFacade.hpp
=== modified file 'storage/ndb/src/ndbapi/TransporterFacade.cpp'
--- a/storage/ndb/src/ndbapi/TransporterFacade.cpp revid:mikael.ronstrom@stripped
+++ b/storage/ndb/src/ndbapi/TransporterFacade.cpp revid:mikael.ronstrom@stripped
@@ -385,6 +385,7 @@ TransporterFacade::start_instance(NodeId
if (!theTransporterRegistry->start_service(m_socket_server))
return -1;
+ theReceiveThread = NULL;
theReceiveThread = NdbThread_Create(runReceiveResponse_C,
(void**)this,
0, // Use default stack size
@@ -601,9 +602,23 @@ ReceiveThreadClient::trp_deliver_signal(
const LinearSectionPtr ptr[3])
{
DBUG_ENTER("ReceiveThreadClient::trp_deliver_signal");
- ndbout_c("Receive thread block should not receive signals, gsn: %d",
- signal->theVerId_signalNumber);
- abort();
+ switch (signal->theVerId_signalNumber)
+ {
+ case GSN_API_REGCONF:
+ case GSN_CONNECT_REP:
+ case GSN_NODE_FAILREP:
+ case GSN_NF_COMPLETEREP:
+ case GSN_TAKE_OVERTCCONF:
+ case GSN_ALLOC_NODEID_CONF:
+ case GSN_SUB_GCP_COMPLETE_REP:
+ break;
+ default:
+ {
+ ndbout_c("Receive thread block should not receive signals, gsn: %d",
+ signal->theVerId_signalNumber);
+ abort();
+ }
+ }
DBUG_VOID_RETURN;
}
@@ -657,6 +672,12 @@ void TransporterFacade::threadMainReceiv
NdbThread_set_shm_sigmask(TRUE);
#endif
ReceiveThreadClient *recv_client = new ReceiveThreadClient(this);
+ while (theReceiveThread == NULL)
+ {
+ NdbSleep_MilliSleep(1);
+ }
+ // Temporarily hardcoded
+ NdbThread_LockCPU(theReceiveThread, (Uint32)7);
while(!theStopReceive)
{
currTime = NdbTick_CurrentMillisecond();
@@ -666,8 +687,10 @@ void TransporterFacade::threadMainReceiv
if (poll_owner)
do_poll(recv_client, 100, true);
}//while
+ delete recv_client;
theTransporterRegistry->stopReceiving();
}
+
/*
This method is called by worker thread that owns the poll "rights".
It waits for events and if something arrives it takes care of it
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-5.5-cluster-7.2 branch (mikael.ronstrom:3952 to 3956) | Mikael Ronstrom | 5 Jul |