[jboss-jira] [JBoss JIRA] Created: (JBAS-7945) LookupSucceededFilter is not thread safe
Brian Stansberry (JIRA)
jira-events at lists.jboss.org
Thu Apr 15 14:41:25 EDT 2010
LookupSucceededFilter is not thread safe
----------------------------------------
Key: JBAS-7945
URL: https://jira.jboss.org/jira/browse/JBAS-7945
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Clustering
Affects Versions: JBossAS-6.0.0.M2, JBossAS-5.1.0.GA, JBossAS-5.1.0.CR1
Reporter: Brian Stansberry
Assignee: Brian Stansberry
Fix For: JBossAS-6.0.0.M3
Access to the private boolean lookupSucceeded field is not controlled.
It should be volatile with an initial false value and only set to true when an acceptable result is received. The only state change is to true.
TruthfulResponseFilterUnitTestCase is intermittently failing, probably for the same reason. Here is the logging it generates when it fails: threads OOB-16 and OOB-15 are concurrently executing in the isAcceptableMethod().
2010-04-14 19:42:15,188 DEBUG [org.jboss.test.cluster.rspfilter.Echo] (RMI TCP Connection(70)-10.16.93.33) callEchoOnCluster(true, false, org.jboss.test.cluster.rspfilter.TruthfulResponseFilter at 34a502)
2010-04-14 19:42:15,201 DEBUG [org.jboss.test.cluster.rspfilter.TruthfulResponseFilter] (OOB-16,null) isAcceptable (true) from 10.16.93.34:55200
2010-04-14 19:42:15,202 DEBUG [org.jboss.test.cluster.rspfilter.TruthfulResponseFilter] (OOB-15,null) isAcceptable (false) from 10.16.93.33:55200
2010-04-14 19:42:15,202 DEBUG [org.jboss.test.cluster.rspfilter.TruthfulResponseFilter] (OOB-16,null) Lookup succeded from 10.16.93.34:55200
2010-04-14 19:42:15,202 DEBUG [org.jboss.test.cluster.rspfilter.TruthfulResponseFilter] (OOB-15,null) needMoreResponses? true
2010-04-14 19:42:15,202 DEBUG [org.jboss.test.cluster.rspfilter.TruthfulResponseFilter] (OOB-16,null) needMoreResponses? true
I'll also change LookupSucceededFilter.isAcceptable() to return false if the response is null, Exception or NoHandlerForRpc. HAPartition or HAJNDI.lookupRemotely() already ignore such values so there is no point accepting them.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list