List:Commits« Previous MessageNext Message »
From:jonas Date:May 18 2007 11:06am
Subject:bk commit into 4.1 tree (jonas:1.2563) BUG#28443
View as plain text  
Below is the list of changes that have just been committed into a local
4.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-18 11:06:03+02:00, jonas@stripped +1 -0
  ndb - bug#28443
    review comment
    if some tcp-transporter has data, then do select with timeout 0

  ndb/src/common/transporter/TransporterRegistry.cpp@stripped, 2007-05-18 11:06:01+02:00,
jonas@stripped +18 -16
    review comment
    if some tcp-transporter has data, then do select with timeout 0

# 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/41-work

--- 1.29/ndb/src/common/transporter/TransporterRegistry.cpp	2007-05-18 11:06:05 +02:00
+++ 1.30/ndb/src/common/transporter/TransporterRegistry.cpp	2007-05-18 11:06:05 +02:00
@@ -814,22 +814,6 @@
     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
@@ -855,6 +839,24 @@
     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++; 
   
Thread
bk commit into 4.1 tree (jonas:1.2563) BUG#28443jonas18 May