[
https://issues.jboss.org/browse/ISPN-1275?page=com.atlassian.jira.plugin....
]
Galder Zamarreño commented on ISPN-1275:
----------------------------------------
Hmmmm, Hot Rod server had been coded with the assumption that hash wheel positions were
fixed. IOW, once a node had picked a position, that was it and no one else would take it
unless this node was removed. Clearly though, that's not the case:
Node A starts up and assigns hash 56 to NodeA:
{code}2011-07-28 17:55:46,535 1414 TRACE
[org.infinispan.distribution.ch.DefaultConsistentHash] (main:) Positions are:
{30=NodeA-23085, 41=NodeA-23085, 54=NodeA-23085, 56=NodeA-23085,...{code}
Node A's Hot Rod server starts up and gets the ids associated with it:
{code}2011-07-28 17:55:46,678 1557 TRACE
[org.infinispan.server.hotrod.test.HotRodTestingUtil$$anon$1] (main:) Cluster address
(NodeA-23085) has these hash ids associated: [30, 41, 54, 56,...{code}
Node B starts up and the rehaser actually takes a position that Node-A had!:
{code}2011-07-28 17:55:47,133 2012 TRACE
[org.infinispan.distribution.ch.DefaultConsistentHash]
(Rehasher,Infinispan-Cluster,NodeA-23085:) Positions are: {30=NodeA-23085, 41=NodeA-23085,
54=NodeA-23085, 56=NodeB-33999,...{code}
So, when B's Hot Rod server tries to get the hash ids associated with it, it finds
56:
{code}2011-07-28 17:55:47,429 2308 TRACE
[org.infinispan.server.hotrod.test.HotRodTestingUtil$$anon$1] (main:) Cluster address
(NodeB-33999) has these hash ids associated: [56,....{code}
The fixed hash position assumption resulted in the assumption that when a Hot Rod server
starts, it adds an entry to the view with its address and hash ids. It doesn't
retrieve other node's hash ids cos it assumes those won't change, but they're
changing and in such way that a node will take another's hash id.
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: Pete Muir
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