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 2012/12/07 07:17:21 UTC

[jira] [Commented] (CASSANDRA-5002) UUIGen should never use another host IP for its node part

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

Jonathan Ellis commented on CASSANDRA-5002:
-------------------------------------------

I'm pretty sure the first part of getAllLocalAddresses (the getAllByName list) will be a subset of the ones seen by getNetworkInterfaces' addresses.  (We do this in CFRR too -- would make sense to extract it somewhere.)

Otherwise +1.
                
> UUIGen should never use another host IP for its node part
> ---------------------------------------------------------
>
>                 Key: CASSANDRA-5002
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-5002
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Sylvain Lebresne
>            Assignee: Sylvain Lebresne
>            Priority: Minor
>             Fix For: 1.2.0 rc1
>
>         Attachments: 5002.txt
>
>
> UUIDGen allows to specify the inet address that we use to generate the node part of the created UUID. This is wrong however. More precisely, the node part is what make sure UUID generated on two different hosts are different, because we can't guarantee that the timestamp and clock parts will be different. In other words, generating on a host a UUID with the node part of another host is dangerous is clearly contrary to the spec.
> And as it turns out, making sure we always use the local address means that the full lsb part of the UUID becomes constant (as it should) and we can remove the nodeCache from UUIDGen and simplify/speedup UUID generation, which is all the more reason to fix it.
> I note that we were almost always using the local address to generate UUID anyway. The only place where we weren't is in Stream{In/Out}Session, and there is virtually no chance that this has ever broke anything (but we should still fix it).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira