]
Will Burns updated ISPN-10289:
------------------------------
Status: Resolved (was: Pull Request Sent)
Resolution: Done
SingleTargetRequest may invoke the response collector twice for same
view
-------------------------------------------------------------------------
Key: ISPN-10289
URL:
https://issues.jboss.org/browse/ISPN-10289
Project: Infinispan
Issue Type: Bug
Components: Core, Test Suite - Core
Affects Versions: 10.0.0.Beta3, 9.4.14.Final
Reporter: Dan Berindei
Assignee: Dan Berindei
Priority: Major
Labels: testsuite_stability
Fix For: 10.0.0.Beta4
{{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}}:
{noformat}
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)
{noformat}