[
https://issues.apache.org/jira/browse/WW-3461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12995772#comment-12995772
]
Shishir Saxena commented on WW-3461:
------------------------------------
I am facing a critical production performance problem for Struts 2.2.1. From
thread dumps, the issue seems to be similar to the one addressed by 'WW-3461'
(mentioned above). Since Struts 2.2.2 is still not released, is it suggested
that only the patch to be applied at 'AnnotationActionValidatorManager.java'
and the related application to be rolled out in production environment, without
being bothered about any side effects*? [*Side effects - Any other Struts2
component using this class starts behaving in an unexpected manner!]. It would
be great if this answer could be responded as the decision to roll out
corresponding application in production depends on the same. Thanks!
> Don't hold locks as long when creating validators in
> AnnotationActionValidatorManager
> -------------------------------------------------------------------------------------
>
> Key: WW-3461
> URL: https://issues.apache.org/jira/browse/WW-3461
> Project: Struts 2
> Issue Type: Improvement
> Affects Versions: 2.1.6
> Reporter: Leigh Anderson
> Assignee: Lukasz Lenart
> Fix For: 2.2.2
>
> Attachments: validatormanager.patch
>
>
> Under load, the lock held in AnnotationActionValidatorManager.getValidators
> on validatorCache becomes contended. This lock is currently held while all
> the validators are created. The attached patch reduces the scope of the lock
> to just doing the cache lookup + taking a defensive copy of the list of
> validators for that key. This improved throughput and latency in our tests.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira