Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-5534

CreateCacheCommand doesn't properly wait for the cache to stabilize

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      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.

      while (stm.getCacheTopology().getMembers().size() != expectedSize && stm.getCacheTopology().getPendingCH() != null) {
      

      should be

      while (stm.getCacheTopology().getMembers().size() != expectedSize || stm.getCacheTopology().getPendingCH() != null) {
      

      Combined with ISPN-5533, this is causing random failures in the M/R tests, e.g.

      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)
      

              dberinde@redhat.com Dan Berindei (Inactive)
              dberinde@redhat.com Dan Berindei (Inactive)
              Archiver:
              rhn-support-adongare Amol Dongare

                Created:
                Updated:
                Resolved:
                Archived: