Dan Berindei created ISPN-5534:
----------------------------------
Summary: CreateCacheCommand doesn't properly wait for the cache to
stabilize
Key: ISPN-5534
URL:
https://issues.jboss.org/browse/ISPN-5534
Project: Infinispan
Issue Type: Bug
Components: Core
Affects Versions: 8.0.0.Alpha1, 7.2.2.Final
Reporter: Dan Berindei
Assignee: Dan Berindei
Priority: Blocker
Fix For: 8.0.0.Alpha2
Because of ISPN-5533, {{CreateCacheCommand.perform()}} waits for the cache to stabilize
with a certain number of members. However, the wait condition is wrong: it will exit the
loop when either the number of members is correct *or* there is no rebalance in progress.
{code}
while (stm.getCacheTopology().getMembers().size() != expectedSize ||
stm.getCacheTopology().getPendingCH() != null) {
{code}
Combined with ISPN-5533, this is causing random failures in the M/R tests, e.g.
{noformat}
23:17:45,353 ERROR (testng-DistributedFourNodesMapReduceTest:) [UnitTestTestNGListener]
Test
testInvokeMapReduceOnAllKeysWithResultCache(org.infinispan.distexec.mapreduce.DistributedFourNodesMapReduceTest)
failed.
java.lang.AssertionError: key 'community' does not have count 2 but 4
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.assertTrue(Assert.java:41)
at
org.infinispan.distexec.mapreduce.BaseWordCountMapReduceTest.verifyResults(BaseWordCountMapReduceTest.java:256)
at
org.infinispan.distexec.mapreduce.BaseWordCountMapReduceTest.verifyResults(BaseWordCountMapReduceTest.java:380)
at
org.infinispan.distexec.mapreduce.BaseWordCountMapReduceTest.testInvokeMapReduceOnAllKeysWithResultCache(BaseWordCountMapReduceTest.java:175)
{noformat}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)