cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yuki Morishita (JIRA)" <>
Subject [jira] [Updated] (CASSANDRA-11286) streaming socket never times out
Date Thu, 10 Mar 2016 00:13:40 GMT


Yuki Morishita updated CASSANDRA-11286:
    Status: Ready to Commit  (was: Patch Available)

> streaming socket never times out
> --------------------------------
>                 Key: CASSANDRA-11286
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Streaming and Messaging
>            Reporter: Paulo Motta
>            Assignee: Paulo Motta
> While trying to reproduce CASSANDRA-8343 I was not able to trigger a {{SocketTimeoutException}}
by adding an artificial sleep longer than {{streaming_socket_timeout_in_ms}}.
> After investigation, I detected two problems:
> * {{ReadableByteChannel}} creation via {{socket.getChannel()}}, as done in {{ConnectionHandler.getReadChannel(socket)}},
does not respect {{socket.setSoTimeout()}}, as explained in this [blog post|]
> ** bq. The only difference between “blocking NIO” and “NIO wrapped around IO”
is that you can’t use socket timeout with SocketChannels. Why ? Read a javadoc for setSocketTimeout().
It says that this timeout is used only by streams.
> * {{socketSoTimeout}} is never set on "follower" side, only on initiator side via {{DefaultConnectionFactory.createConnection(peer)}}.
> This may cause streaming to hang indefinitely, as exemplified by CASSANDRA-8621:
> bq. For the scenario that prompted this ticket, it appeared that the streaming process
was completely stalled. One side of the stream (the sender side) had an exception that appeared
to be a connection reset. The receiving side appeared to think that the connection was still
active, at least in terms of the netstats reported by nodetool. We were unable to verify whether
this was specifically the case in terms of connected sockets due to the fact that there were
multiple streams for those peers, and there is no simple way to correlate a specific stream
to a tcp session.

This message was sent by Atlassian JIRA

View raw message