cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject svn commit: r1055213 - in /cassandra/branches/cassandra-0.6: CHANGES.txt src/java/org/apache/cassandra/net/IncomingTcpConnection.java src/java/org/apache/cassandra/net/OutboundTcpConnection.java
Date Tue, 04 Jan 2011 22:22:08 GMT
Author: brandonwilliams
Date: Tue Jan  4 22:22:08 2011
New Revision: 1055213

URL: http://svn.apache.org/viewvc?rev=1055213&view=rev
Log:
buffer network stack to avoid inefficient small TCP messages while
avoiding the nagle/delayed ack problem.  Patch by Tsiki Rosenmann,
brandonwilliams and jbellis, reviewed by brandonwilliams for
CASSANDRA-1896

Modified:
    cassandra/branches/cassandra-0.6/CHANGES.txt
    cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/net/IncomingTcpConnection.java
    cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/net/OutboundTcpConnection.java

Modified: cassandra/branches/cassandra-0.6/CHANGES.txt
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.6/CHANGES.txt?rev=1055213&r1=1055212&r2=1055213&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.6/CHANGES.txt (original)
+++ cassandra/branches/cassandra-0.6/CHANGES.txt Tue Jan  4 22:22:08 2011
@@ -1,3 +1,7 @@
+0.6.10
+  * buffer network stack to avoid inefficient small TCP messages while avoiding
+    the nagle/delayed ack problem (CASSANDRA-1896)
+
 0.6.9
  * add clustertool, config-converter, sstablekeys, and schematool 
    Windows .bat files (CASSANDRA-1723)

Modified: cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/net/IncomingTcpConnection.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/net/IncomingTcpConnection.java?rev=1055213&r1=1055212&r2=1055213&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/net/IncomingTcpConnection.java
(original)
+++ cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/net/IncomingTcpConnection.java
Tue Jan  4 22:22:08 2011
@@ -41,7 +41,7 @@ public class IncomingTcpConnection exten
         this.socket = socket;
         try
         {
-            input = new DataInputStream(socket.getInputStream());
+            input = new DataInputStream(new BufferedInputStream(socket.getInputStream(),
4096));
         }
         catch (IOException e)
         {

Modified: cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/net/OutboundTcpConnection.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/net/OutboundTcpConnection.java?rev=1055213&r1=1055212&r2=1055213&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/net/OutboundTcpConnection.java
(original)
+++ cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/net/OutboundTcpConnection.java
Tue Jan  4 22:22:08 2011
@@ -21,6 +21,7 @@ package org.apache.cassandra.net;
  */
 
 
+import java.io.BufferedOutputStream;
 import java.io.DataOutputStream;
 import java.io.IOException;
 import java.net.InetAddress;
@@ -150,7 +151,7 @@ public class OutboundTcpConnection exten
                 socket = new Socket(endpoint, DatabaseDescriptor.getStoragePort(), FBUtilities.getLocalAddress(),
0);
                 socket.setKeepAlive(true);
                 socket.setTcpNoDelay(true);
-                output = new DataOutputStream(socket.getOutputStream());
+                output = new DataOutputStream(new BufferedOutputStream(socket.getOutputStream(),
4096));
                 return true;
             }
             catch (IOException e)



Mime
View raw message