]
Dan Berindei resolved ISPN-1085.
--------------------------------
Fix Version/s: 4.2.2.FINAL
5.0.0.FINAL
Resolution: Done
I merged the pull request. Jurgen, please reopen if you see it happening again.
TopologyAwareConsistentHash can run in an endless loop when
rehashing
---------------------------------------------------------------------
Key: ISPN-1085
URL:
https://issues.jboss.org/browse/ISPN-1085
Project: Infinispan
Issue Type: Bug
Components: Distributed Cache
Affects Versions: 4.2.1.FINAL
Environment: Infinispan 4.2.1 using distributed caches and 3 cluster nodes with
siteId and machineId (siteId is the same on all nodes, machineId is different)
Reporter: Jürgen Kellerer
Assignee: Mircea Markus
Priority: Critical
Fix For: 4.2.2.BETA1, 4.2.2.FINAL, 5.0.0.CR3, 5.0.0.FINAL
I'm not exactly sure how to reproduce it and why it happened but at least the problem
is a quality / error handling issue.
TopologyAwareConsistentHash can run in an endless loop when rehashing runs and
'numOwners' is greater than the available addresses in 'processSequence'.
The endless loop is in the method _getOwners()_ and the reason for it is shown in the
simplified snippet below. It would really be helpful if the method either throws an
exception with an exact definition what went wrong (e.g. including the address list and
numOwners count) or handle the case if it's normal that this can happen when the
cluster is just about to be built up.
{code:java}
private List<Address> getOwners(Address address, int numOwners) {
...
ArrayList<Address> processSequence = ...
...
List<Address> result = new ArrayList<Address>();
while (result.size() < numOwners) {
Iterator<Address> addrIt = processSequence.iterator();
while (addrIt.hasNext()) {
result.add(addrIt.next());
addrIt.remove();
}
}
return result;
}
{code}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: