Below is the list of changes that have just been committed into a local
5.1 repository of jonas. When jonas does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-05-29 07:43:34+02:00, jonas@stripped +3 -0
Merge perch.ndb.mysql.com:/home/jonas/src/drop5
into perch.ndb.mysql.com:/home/jonas/src/drop6
MERGE: 1.2071.1.76
storage/ndb/src/common/transporter/TCP_Transporter.hpp@stripped, 2007-05-29 07:43:32+02:00, jonas@stripped +0 -0
Auto merged
MERGE: 1.6.1.1
storage/ndb/src/common/transporter/TransporterRegistry.cpp@stripped, 2007-05-29 07:43:32+02:00, jonas@stripped +0 -0
Auto merged
MERGE: 1.63.1.2
storage/ndb/test/run-test/daily-basic-tests.txt@stripped, 2007-05-29 07:43:32+02:00, jonas@stripped +0 -0
Auto merged
MERGE: 1.51.1.4
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: jonas
# Host: perch.ndb.mysql.com
# Root: /home/jonas/src/drop6/RESYNC
--- 1.54/storage/ndb/test/run-test/daily-basic-tests.txt 2007-05-29 07:43:37 +02:00
+++ 1.55/storage/ndb/test/run-test/daily-basic-tests.txt 2007-05-29 07:43:37 +02:00
@@ -633,6 +633,10 @@
cmd: testNdbApi
args: -n CheckNdbObjectList T1
+max-time: 1000
+cmd: testNdbApi
+args: -n Bug28443
+
#max-time: 500
#cmd: testInterpreter
#args: T1
--- 1.7/storage/ndb/src/common/transporter/TCP_Transporter.hpp 2007-05-29 07:43:37 +02:00
+++ 1.8/storage/ndb/src/common/transporter/TCP_Transporter.hpp 2007-05-29 07:43:37 +02:00
@@ -92,6 +92,10 @@
virtual void updateReceiveDataPtr(Uint32 bytesRead);
virtual Uint32 get_free_buffer() const;
+
+ inline bool hasReceiveData () const {
+ return receiveBuffer.sizeOfData > 0;
+ }
protected:
/**
* Setup client/server and perform connect/accept
--- 1.66/storage/ndb/src/common/transporter/TransporterRegistry.cpp 2007-05-29 07:43:37 +02:00
+++ 1.67/storage/ndb/src/common/transporter/TransporterRegistry.cpp 2007-05-29 07:43:37 +02:00
@@ -845,28 +845,13 @@
Uint32
TransporterRegistry::poll_TCP(Uint32 timeOutMillis)
{
+ bool hasdata = false;
if (false && nTCPTransporters == 0)
{
tcpReadSelectReply = 0;
return 0;
}
- struct timeval timeout;
-#ifdef NDB_OSE
- // Return directly if there are no TCP transporters configured
-
- if(timeOutMillis <= 1){
- timeout.tv_sec = 0;
- timeout.tv_usec = 1025;
- } else {
- timeout.tv_sec = timeOutMillis / 1000;
- timeout.tv_usec = (timeOutMillis % 1000) * 1000;
- }
-#else
- timeout.tv_sec = timeOutMillis / 1000;
- timeout.tv_usec = (timeOutMillis % 1000) * 1000;
-#endif
-
NDB_SOCKET_TYPE maxSocketValue = -1;
// Needed for TCP/IP connections
@@ -889,8 +874,27 @@
// Put the connected transporters in the socket read-set
FD_SET(socket, &tcpReadset);
}
+ hasdata |= t->hasReceiveData();
}
+ timeOutMillis = hasdata ? 0 : timeOutMillis;
+
+ struct timeval timeout;
+#ifdef NDB_OSE
+ // Return directly if there are no TCP transporters configured
+
+ if(timeOutMillis <= 1){
+ timeout.tv_sec = 0;
+ timeout.tv_usec = 1025;
+ } else {
+ timeout.tv_sec = timeOutMillis / 1000;
+ timeout.tv_usec = (timeOutMillis % 1000) * 1000;
+ }
+#else
+ timeout.tv_sec = timeOutMillis / 1000;
+ timeout.tv_usec = (timeOutMillis % 1000) * 1000;
+#endif
+
// The highest socket value plus one
maxSocketValue++;
@@ -905,7 +909,7 @@
}
#endif
- return tcpReadSelectReply;
+ return tcpReadSelectReply || hasdata;
}
#endif
@@ -941,27 +945,28 @@
#endif
#ifdef NDB_TCP_TRANSPORTER
- if(tcpReadSelectReply > 0)
+ for (int i=0; i<nTCPTransporters; i++)
{
- for (int i=0; i<nTCPTransporters; i++)
+ checkJobBuffer();
+ TCP_Transporter *t = theTCPTransporters[i];
+ const NodeId nodeId = t->getRemoteNodeId();
+ const NDB_SOCKET_TYPE socket = t->getSocket();
+ if(is_connected(nodeId))
{
- checkJobBuffer();
- TCP_Transporter *t = theTCPTransporters[i];
- const NodeId nodeId = t->getRemoteNodeId();
- const NDB_SOCKET_TYPE socket = t->getSocket();
- if(is_connected(nodeId)){
- if(t->isConnected() && FD_ISSET(socket, &tcpReadset))
- {
- const int receiveSize = t->doReceive();
- if(receiveSize > 0)
- {
- Uint32 * ptr;
- Uint32 sz = t->getReceiveData(&ptr);
- transporter_recv_from(callbackObj, nodeId);
- Uint32 szUsed = unpack(ptr, sz, nodeId, ioStates[nodeId]);
- t->updateReceiveDataPtr(szUsed);
- }
- }
+ if(t->isConnected())
+ {
+ if (FD_ISSET(socket, &tcpReadset))
+ {
+ t->doReceive();
+ }
+
+ if (t->hasReceiveData())
+ {
+ Uint32 * ptr;
+ Uint32 sz = t->getReceiveData(&ptr);
+ Uint32 szUsed = unpack(ptr, sz, nodeId, ioStates[nodeId]);
+ t->updateReceiveDataPtr(szUsed);
+ }
}
}
}
| Thread |
|---|
| • bk commit into 5.1 tree (jonas:1.2137) | jonas | 29 May |