You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jonathan Ellis (JIRA)" <ji...@apache.org> on 2010/01/25 20:55:34 UTC

[jira] Commented: (CASSANDRA-737) Streaming code relies on sockets being bound to the correct address (InetAddress.anyLocalAddress() is bad)

    [ https://issues.apache.org/jira/browse/CASSANDRA-737?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12804677#action_12804677 ] 

Jonathan Ellis commented on CASSANDRA-737:
------------------------------------------

does this affect 0.5 too?

> Streaming code relies on sockets being bound to the correct address (InetAddress.anyLocalAddress() is bad)
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-737
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-737
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 0.6
>         Environment: Mac OS X.
>            Reporter: Gary Dusbabek
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.6
>
>         Attachments: 737.patch
>
>
> I came across this while testing streaming locally.  The new streaming code makes use of the remote socket address supplied by the socket.  This means that it will return whatever address the socket is bound to, which is not necessarily the address configured for cassandra.  This confuses StreamContextManager when data comes streaming in from addresses that it doesn't recognize.
> Two solutions will work.
> 1. bind outgoing sockets to the correct interface.
> 2. Include the local address in StreamContexts that get sent.
> I opted for 1 since it required less code.  2 was easy enough but would have required changing the format of the message to make the source address more easily accessible (the constructor for IncomingStreamReader wants to know the source host to create the stream context at the destination).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.