cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Dusbabek (JIRA)" <>
Subject [jira] Updated: (CASSANDRA-737) Streaming code relies on sockets being bound to the correct address (InetAddress.anyLocalAddress() is bad)
Date Mon, 25 Jan 2010 19:55:34 GMT


Gary Dusbabek updated CASSANDRA-737:

    Attachment: 737.patch

I think I caught all the socket creation places.

> Streaming code relies on sockets being bound to the correct address (InetAddress.anyLocalAddress()
is bad)
> ----------------------------------------------------------------------------------------------------------
>                 Key: CASSANDRA-737
>                 URL:
>             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
> 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.

View raw message