cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yu...@apache.org
Subject [3/6] git commit: Fix NPE caused by CASSANDRA-6818
Date Tue, 08 Apr 2014 18:07:48 GMT
Fix NPE caused by CASSANDRA-6818

patch by yukim; reviewed by thobbs for CASSANDRA-6984


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

Branch: refs/heads/trunk
Commit: c6ec5d5b2b1cecf6189bf469959bd9b014c54513
Parents: 84daab5
Author: Yuki Morishita <yukim@apache.org>
Authored: Tue Apr 8 12:59:44 2014 -0500
Committer: Yuki Morishita <yukim@apache.org>
Committed: Tue Apr 8 12:59:44 2014 -0500

----------------------------------------------------------------------
 src/java/org/apache/cassandra/streaming/ConnectionHandler.java | 2 +-
 src/java/org/apache/cassandra/streaming/StreamSession.java     | 6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/c6ec5d5b/src/java/org/apache/cassandra/streaming/ConnectionHandler.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/streaming/ConnectionHandler.java b/src/java/org/apache/cassandra/streaming/ConnectionHandler.java
index 356138b..b06a818 100644
--- a/src/java/org/apache/cassandra/streaming/ConnectionHandler.java
+++ b/src/java/org/apache/cassandra/streaming/ConnectionHandler.java
@@ -366,7 +366,7 @@ public class ConnectionHandler
             {
                 throw new AssertionError(e);
             }
-            catch (IOException e)
+            catch (Throwable e)
             {
                 session.onError(e);
             }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c6ec5d5b/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 449751d..7976a40 100644
--- a/src/java/org/apache/cassandra/streaming/StreamSession.java
+++ b/src/java/org/apache/cassandra/streaming/StreamSession.java
@@ -462,7 +462,11 @@ public class StreamSession implements IEndpointStateChangeSubscriber,
IFailureDe
         StreamingMetrics.totalOutgoingBytes.inc(headerSize);
         metrics.outgoingBytes.inc(headerSize);
         // schedule timeout for receiving ACK
-        transfers.get(header.cfId).scheduleTimeout(header.sequenceNumber, 12, TimeUnit.HOURS);
+        StreamTransferTask task = transfers.get(header.cfId);
+        if (task != null)
+        {
+            task.scheduleTimeout(header.sequenceNumber, 12, TimeUnit.HOURS);
+        }
     }
 
     /**


Mime
View raw message