cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yu...@apache.org
Subject [01/15] cassandra git commit: Set default streaming_socket_timeout_in_ms to 24 hours
Date Thu, 26 May 2016 00:36:02 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 6100eb2c1 -> d27f9b0b7
  refs/heads/cassandra-2.2 907c8263b -> 2bacc9a5c
  refs/heads/cassandra-3.0 ed84bbcbb -> e000ebbe5
  refs/heads/cassandra-3.7 ecdbe3f91 -> f39a352fd
  refs/heads/trunk 87def2ef3 -> 9c8ee4c73


Set default streaming_socket_timeout_in_ms to 24 hours

Patch by Paulo Motta; reviewed by Yuki Morishita for CASSANDRA-11840


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/d27f9b0b
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d27f9b0b
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d27f9b0b

Branch: refs/heads/cassandra-2.1
Commit: d27f9b0b772ba60fece3f3b1101ff63aabdad1fb
Parents: 6100eb2
Author: Paulo Motta <pauloricardomg@gmail.com>
Authored: Wed May 18 12:40:01 2016 -0300
Committer: Yuki Morishita <yukim@apache.org>
Committed: Wed May 25 19:26:51 2016 -0500

----------------------------------------------------------------------
 CHANGES.txt                                            |  1 +
 conf/cassandra.yaml                                    | 10 ++++++----
 src/java/org/apache/cassandra/config/Config.java       |  2 +-
 .../org/apache/cassandra/streaming/StreamSession.java  | 13 ++++++++++++-
 4 files changed, 20 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d27f9b0b/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index d914420..8dfa02a 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.15
+ * Set default streaming_socket_timeout_in_ms to 24 hours (CASSANDRA-11840)
  * Do not consider local node a valid source during replace (CASSANDRA-11848)
  * Avoid holding SSTableReaders for duration of incremental repair (CASSANDRA-11739)
  * Add message dropped tasks to nodetool netstats (CASSANDRA-11855)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d27f9b0b/conf/cassandra.yaml
----------------------------------------------------------------------
diff --git a/conf/cassandra.yaml b/conf/cassandra.yaml
index 90c5be4..7f2a6fa 100644
--- a/conf/cassandra.yaml
+++ b/conf/cassandra.yaml
@@ -635,10 +635,12 @@ request_timeout_in_ms: 10000
 cross_node_timeout: false
 
 # Set socket timeout for streaming operation.
-# The stream session is failed if no data is received by any of the
-# participants within that period.
-# Default value is 3600000, which means streams timeout after an hour.
-# streaming_socket_timeout_in_ms: 3600000
+# The stream session is failed if no data/ack is received by any of the participants
+# within that period, which means this should also be sufficient to stream a large
+# sstable or rebuild table indexes.
+# Default value is 86400000ms, which means stale streams timeout after 24 hours.
+# A value of zero means stream sockets should never time out.
+# streaming_socket_timeout_in_ms: 86400000
 
 # phi value that must be reached for a host to be marked down.
 # most users should never need to adjust this.

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d27f9b0b/src/java/org/apache/cassandra/config/Config.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/config/Config.java b/src/java/org/apache/cassandra/config/Config.java
index 9ff7096..2c5e36a 100644
--- a/src/java/org/apache/cassandra/config/Config.java
+++ b/src/java/org/apache/cassandra/config/Config.java
@@ -85,7 +85,7 @@ public class Config
 
     public volatile Long truncate_request_timeout_in_ms = 60000L;
 
-    public Integer streaming_socket_timeout_in_ms = 3600000;
+    public Integer streaming_socket_timeout_in_ms = 86400000; //24 hours
 
     public boolean cross_node_timeout = false;
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d27f9b0b/src/java/org/apache/cassandra/streaming/StreamSession.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/streaming/StreamSession.java b/src/java/org/apache/cassandra/streaming/StreamSession.java
index 642e837..4eb8557 100644
--- a/src/java/org/apache/cassandra/streaming/StreamSession.java
+++ b/src/java/org/apache/cassandra/streaming/StreamSession.java
@@ -20,6 +20,7 @@ package org.apache.cassandra.streaming;
 import java.io.IOException;
 import java.net.InetAddress;
 import java.net.Socket;
+import java.net.SocketTimeoutException;
 import java.util.*;
 import java.util.concurrent.*;
 import java.util.concurrent.atomic.AtomicBoolean;
@@ -502,7 +503,17 @@ public class StreamSession implements IEndpointStateChangeSubscriber
      */
     public void onError(Throwable e)
     {
-        logger.error("[Stream #{}] Streaming error occurred", planId(), e);
+        if (e instanceof SocketTimeoutException)
+        {
+            logger.error("[Stream #{}] Streaming socket timed out. This means the session
peer stopped responding or " +
+                         "is still processing received data. If there is no sign of failure
in the other end or a very " +
+                         "dense table is being transferred you may want to increase streaming_socket_timeout_in_ms
" +
+                         "property. Current value is {}ms.", planId(), DatabaseDescriptor.getStreamingSocketTimeout(),
e);
+        }
+        else
+        {
+            logger.error("[Stream #{}] Streaming error occurred", planId(), e);
+        }
         // send session failure message
         if (handler.isOutgoingConnected())
             handler.sendMessage(new SessionFailedMessage());


Mime
View raw message