[infinispan-issues] [JBoss JIRA] (ISPN-5534) CreateCacheCommand doesn't properly wait for the cache to stabilize

Dan Berindei (JIRA) issues at jboss.org
Tue Jun 9 04:23:04 EDT 2015


     [ https://issues.jboss.org/browse/ISPN-5534?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dan Berindei updated ISPN-5534:
-------------------------------
    Description: 
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}

should be

{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}


  was:
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}




> 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: 7.2.2.Final, 8.0.0.Alpha1
>            Reporter: Dan Berindei
>            Assignee: Dan Berindei
>            Priority: Blocker
>              Labels: testsuite_stability
>             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}
> should be
> {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)


More information about the infinispan-issues mailing list