List:Commits« Previous MessageNext Message »
From:lzhou Date:March 30 2007 3:01pm
Subject:bk commit into 5.0 tree (lzhou:1.2389) BUG#24793
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of zhl. When zhl 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-03-30 15:01:03+00:00, lzhou@dev3-63.(none) +1 -0
  BUG#24793 Add SO_KEEPALIVE socket option to avoid cluster nodes keeping dead connections forever.

  ndb/src/common/transporter/TCP_Transporter.cpp@stripped, 2007-03-30 15:00:59+00:00, lzhou@dev3-63.(none) +7 -0
    Add SO_KEEPALIVE socket option

# 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:	lzhou
# Host:	dev3-63.(none)
# Root:	/home/zhl/mysql/mysql-5.0/bug24793

--- 1.11/ndb/src/common/transporter/TCP_Transporter.cpp	2007-03-30 15:01:16 +00:00
+++ 1.12/ndb/src/common/transporter/TCP_Transporter.cpp	2007-03-30 15:01:16 +00:00
@@ -155,6 +155,8 @@ TCP_Transporter::initTransporter() {
 
 void
 TCP_Transporter::setSocketOptions(){
+  int sockOptKeepAlive  = 1;
+
   if (setsockopt(theSocket, SOL_SOCKET, SO_RCVBUF,
                  (char*)&sockOptRcvBufSize, sizeof(sockOptRcvBufSize)) < 0) {
 #ifdef DEBUG_TRANSPORTER
@@ -169,6 +171,11 @@ TCP_Transporter::setSocketOptions(){
 #endif
   }//if
   
+  if (setsockopt(theSocket, SOL_SOCKET, SO_KEEPALIVE,
+                 (char*)&sockOptKeepAlive, sizeof(sockOptKeepAlive)) < 0) {
+    ndbout_c("The setsockopt SO_KEEPALIVE error code = %d", InetErrno);
+  }//if
+
   //-----------------------------------------------
   // Set the TCP_NODELAY option so also small packets are sent
   // as soon as possible
Thread
bk commit into 5.0 tree (lzhou:1.2389) BUG#24793lzhou30 Mar