cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paulo Motta (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-11286) streaming socket never times out
Date Tue, 08 Mar 2016 15:09:40 GMT

     [ https://issues.apache.org/jira/browse/CASSANDRA-11286?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Paulo Motta updated CASSANDRA-11286:
------------------------------------
    Reproduced In: 3.4, 2.2.5, 2.1.13  (was: 2.1.13, 2.2.5, 3.4)
           Status: Open  (was: Patch Available)

Canceling patch due to a minor nit that will be fixed shortly.

> streaming socket never times out
> --------------------------------
>
>                 Key: CASSANDRA-11286
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-11286
>             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|https://technfun.wordpress.com/2009/01/29/networking-in-java-non-blocking-nio-blocking-nio-and-io/]
> ** 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
(v6.3.4#6332)

Mime
View raw message