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

SingleTargetRequest may invoke the response collector twice for same view

    XMLWordPrintable

Details

    Description

      SingleTargetRequest.onNewView() is sometimes invoked twice:

      • From JGroupsTransport.invokeCommand(), in the thread that is sending the request
      • From JGroupsTransport.receiveClusterView(), in the thread processing the view change

      Because of insufficient synchronization, both onNewView() invocations may trigger a call to ResponseCollector.addResponse(), and the collector may not deal with the extra call properly.

      For example, the bridge response collectors used by ControlledRpcManager do not allow duplicate responses for the same target, and this causes random failures in GetAllCommandNodeCrashTest:

      12:44:56.270 [ERROR] commands.GetAllCommandNodeCrashTest(org.infinispan.commands.GetAllCommandNodeCrashTest)  Time elapsed: 0.144 s  <<< FAILURE!
      java.lang.AssertionError: 
      	at org.testng.AssertJUnit.fail(AssertJUnit.java:59)
      	at org.testng.AssertJUnit.assertTrue(AssertJUnit.java:24)
      	at org.testng.AssertJUnit.assertFalse(AssertJUnit.java:41)
      	at org.testng.AssertJUnit.assertFalse(AssertJUnit.java:49)
      	at org.infinispan.util.ControlledRpcManager$BlockedResponseMap.receive(ControlledRpcManager.java:701)
      	at org.infinispan.util.ControlledRpcManager$SentRequest.receiveAll(ControlledRpcManager.java:601)
      	at org.infinispan.commands.GetAllCommandNodeCrashTest.test(GetAllCommandNodeCrashTest.java:66)
      

      Attachments

        Activity

          People

            dberinde@redhat.com Dan Berindei (Inactive)
            dberinde@redhat.com Dan Berindei (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: