List:Commits« Previous MessageNext Message »
From:jonas Date:May 8 2008 10:07am
Subject:bk commit into 5.1 tree (jonas:1.2588) BUG#36537
View as plain text  
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, 2008-05-08 12:07:00+02:00, jonas@stripped +3 -0
  ndb - bug#36537
    Dont remove socket from epoll-set at all (since there can be a race)
    given the linux-kernel automatically removes it when it's closed.

  storage/ndb/include/transporter/TransporterRegistry.hpp@stripped, 2008-05-08 12:06:58+02:00, jonas@stripped +0 -1
    Dont remove socket from epoll-set at all (since it's can be a race)
    given the linux-kernel automatically removes it when it's closed.

  storage/ndb/src/common/transporter/TCP_Transporter.cpp@stripped, 2008-05-08 12:06:58+02:00, jonas@stripped +0 -1
    Dont remove socket from epoll-set at all (since it's can be a race)
    given the linux-kernel automatically removes it when it's closed.

  storage/ndb/src/common/transporter/TransporterRegistry.cpp@stripped, 2008-05-08 12:06:58+02:00, jonas@stripped +11 -16
    Dont remove socket from epoll-set at all (since it's can be a race)
    given the linux-kernel automatically removes it when it's closed.

diff -Nrup a/storage/ndb/include/transporter/TransporterRegistry.hpp b/storage/ndb/include/transporter/TransporterRegistry.hpp
--- a/storage/ndb/include/transporter/TransporterRegistry.hpp	2008-03-14 08:21:23 +01:00
+++ b/storage/ndb/include/transporter/TransporterRegistry.hpp	2008-05-08 12:06:58 +02:00
@@ -276,7 +276,6 @@ public:
   Transporter* get_transporter(NodeId nodeId);
   NodeId get_localNodeId() { return localNodeId; };
 
-  void remove_from_epoll(NodeId node_id);
   struct in_addr get_connect_address(NodeId node_id) const;
 protected:
   
diff -Nrup a/storage/ndb/src/common/transporter/TCP_Transporter.cpp b/storage/ndb/src/common/transporter/TCP_Transporter.cpp
--- a/storage/ndb/src/common/transporter/TCP_Transporter.cpp	2008-04-22 21:59:50 +02:00
+++ b/storage/ndb/src/common/transporter/TCP_Transporter.cpp	2008-05-08 12:06:58 +02:00
@@ -456,7 +456,6 @@ TCP_Transporter::doReceive() {
 void
 TCP_Transporter::disconnectImpl() {
   if(theSocket != NDB_INVALID_SOCKET){
-    m_transporter_registry.remove_from_epoll(remoteNodeId);
     if(NDB_CLOSE_SOCKET(theSocket) < 0){
       report_error(TE_ERROR_CLOSING_SOCKET);
     }
diff -Nrup a/storage/ndb/src/common/transporter/TransporterRegistry.cpp b/storage/ndb/src/common/transporter/TransporterRegistry.cpp
--- a/storage/ndb/src/common/transporter/TransporterRegistry.cpp	2008-04-25 11:17:56 +02:00
+++ b/storage/ndb/src/common/transporter/TransporterRegistry.cpp	2008-05-08 12:06:58 +02:00
@@ -845,20 +845,6 @@ TransporterRegistry::poll_TCP(Uint32 tim
 }
 #endif
 
-void
-TransporterRegistry::remove_from_epoll(NodeId node_id)
-{
-#if defined(HAVE_EPOLL_CREATE)
-  DBUG_ENTER("TransporterRegistry::remove_from_epoll");
-  change_epoll((TCP_Transporter*)theTransporters[node_id], FALSE);
-  m_has_data_transporters.clear(node_id);
-  DBUG_VOID_RETURN;
-#else
-  (void)node_id;
-  return;
-#endif
-}
-
 #if defined(HAVE_EPOLL_CREATE)
 bool
 TransporterRegistry::change_epoll(TCP_Transporter *t, bool add)
@@ -894,7 +880,14 @@ TransporterRegistry::change_epoll(TCP_Tr
      * have permission problems or the socket doesn't support
      * epoll!!
      */
-    perror("Failed to add fd to epoll-set...giving up!");
+    ndbout_c("Failed to %s epollfd: %u fd %u node %u to epoll-set,"
+             " errno: %u %s",
+             add ? "ADD" : "DEL",
+             m_epoll_fd,
+             sock_fd,
+             node_id,
+             error,
+             strerror(error));
     abort();
   }
   ndbout << "We lacked memory to add the socket for node id ";
@@ -1192,7 +1185,9 @@ TransporterRegistry::report_disconnect(N
   DBUG_ENTER("TransporterRegistry::report_disconnect");
   DBUG_PRINT("info",("performStates[%d]=DISCONNECTED",node_id));
   performStates[node_id] = DISCONNECTED;
-  remove_from_epoll(node_id);
+#ifdef HAVE_EPOLL_CREATE
+  m_has_data_transporters.clear(node_id);
+#endif
   reportDisconnect(callbackObj, node_id, errnum);
   DBUG_VOID_RETURN;
 }
Thread
bk commit into 5.1 tree (jonas:1.2588) BUG#36537jonas8 May