dcapwell commented on code in PR #2104:
URL: https://github.com/apache/cassandra/pull/2104#discussion_r1090999747


##########
src/java/org/apache/cassandra/config/DatabaseDescriptor.java:
##########
@@ -3416,6 +3416,11 @@ public static boolean streamEntireSSTables()
         return conf.stream_entire_sstables;
     }
 
+    public static long getStreamTransferTaskTimeout()
+    {
+        return conf.stream_transfer_task_timeout.toMilliseconds();

Review Comment:
   don't convert, return and allow the caller to convert



##########
src/java/org/apache/cassandra/streaming/StreamSession.java:
##########
@@ -981,7 +987,7 @@ public void streamSent(OutgoingStreamMessage message)
         StreamTransferTask task = transfers.get(message.header.tableId);
         if (task != null)
         {
-            task.scheduleTimeout(message.header.sequenceNumber, 12, 
TimeUnit.HOURS);
+            task.scheduleTimeout(message.header.sequenceNumber, 
DatabaseDescriptor.getStreamTransferTaskTimeout(), TimeUnit.MILLISECONDS);

Review Comment:
   do conversation at this layer, do not delegate that to DD



##########
src/java/org/apache/cassandra/streaming/StreamSession.java:
##########
@@ -694,8 +701,7 @@ public Future<?> onError(Throwable e)
             state(State.FAILED); // make sure subsequent error handling sees 
the session in a final state 
             channel.sendControlMessage(new 
SessionFailedMessage()).awaitUninterruptibly();
         }
-
-        return closeSession(State.FAILED);
+        return closeSession(State.FAILED, "Failed because of an exception that 
is not an EOF exception;\n" + Throwables.getStackTraceAsString(e));

Review Comment:
   I would just say "Failed with unknown exception;\n"



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to