[jboss-jira] [JBoss JIRA] (WFCORE-1049) ConcreteResourceRegistration#registerSubModel is not thread safe
Brian Stansberry (JIRA)
issues at jboss.org
Fri Nov 6 08:24:00 EST 2015
[ https://issues.jboss.org/browse/WFCORE-1049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13126374#comment-13126374 ]
Brian Stansberry commented on WFCORE-1049:
------------------------------------------
[~swd847] Thanks for the link. That's another example of the same failure pattern.
"Also I'm not sure why you can't just use a sync block to make sure that the underlying object is fully initialized before it is published?"
All the getter methods on the MRR would need to be synchronized for that to help. That's doable and probably simpler but now we've made methods that get called a lot synchronized. I don't expect much contention around those calls, but there's some overhead.
Doing that would remove the need for the last 2 commits in my PR, but only if I went back to doing the registerAttributes/Operations/Descriptions calls after I published the MRR.
> ConcreteResourceRegistration#registerSubModel is not thread safe
> ----------------------------------------------------------------
>
> Key: WFCORE-1049
> URL: https://issues.jboss.org/browse/WFCORE-1049
> Project: WildFly Core
> Issue Type: Bug
> Components: Domain Management
> Reporter: Stuart Douglas
> Assignee: Brian Stansberry
> Fix For: 3.0.0.Alpha1
>
>
> registerSubModel checks for existing, then registers, however it is invoked by two threads at the same time it is possible they will both see the resource as not existing and both register.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the jboss-jira
mailing list