[infinispan-issues] [JBoss JIRA] Commented: (ISPN-1275) Virtual nodes producing same hash id for two different cluster nodes

Dan Berindei (JIRA) jira-events at lists.jboss.org
Fri Jul 29 06:30:23 EDT 2011


    [ https://issues.jboss.org/browse/ISPN-1275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12617491#comment-12617491 ] 

Dan Berindei commented on ISPN-1275:
------------------------------------

Manik, it's a general consistent hash thing, if there is a collision (two nodes get the same normalized hash) then the second node joining or leaving has a 50% chance of changing the other node's hash id.

Obviously with virtual nodes the chance of a collision is much higher, and with 2000 nodes in a 10240 hash space it's really close to 100%.

I think this also opens the possibility for ISPN-1170 to happen again:
{code}
hash(k) = 101
ch_0 = {A{r0,m0} = 100, B{r0,m0} = 102, C{r0,m1} = 103}
loc_0(k) = {B, C}

//after D{r1,m0} == 100 joins
ch_0 = {D{r1,m0} = 100, A{r0,m0} = 101, B{r0,m0} = 102, C{r0,m1} = 103}
loc_1(k) = {A, D}
{code}

> Virtual nodes producing same hash id for two different cluster nodes
> --------------------------------------------------------------------
>
>                 Key: ISPN-1275
>                 URL: https://issues.jboss.org/browse/ISPN-1275
>             Project: Infinispan
>          Issue Type: Bug
>          Components: Distributed Cache
>    Affects Versions: 5.0.0.CR8
>            Reporter: Galder Zamarreño
>            Assignee: Manik Surtani
>            Priority: Blocker
>             Fix For: 5.0.0.FINAL
>
>         Attachments: hashids.log
>
>
> While working on ISPN-1273, I've discovered that when virtual nodes are enabled, ConsistentHash.getHashIds(address) can return the same hash for two different cluster nodes. Example: with 500 virtual nodes, both NodeA-23181 and NodeB-39177 produce hash id *5289*. See attached log.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the infinispan-issues mailing list