You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tiles.apache.org by "Jakub Dziworski (JIRA)" <ji...@apache.org> on 2016/06/24 12:53:16 UTC
[jira] [Updated] (TILES-585) Definition cascade attributes
duplicated values under high load
[ https://issues.apache.org/jira/browse/TILES-585?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jakub Dziworski updated TILES-585:
----------------------------------
Description:
The problem concerns {code:java} CachingLocaleUrlDefinitionDAO.getDefinitions(Locale customizationKey) {code}
which lacks synchronization.
To reproduce the bug:
# Set up few clients with different Accept-Language headers
# Make the clients perform many request in short time (check out jmeter script attached below)
# the retValue contains entries with definitions with cascade attirbutes whose elements are duplicated.
We *fixed it by marking getDefinitions method synchronized*.
Here is jmeter script to reproduce bug:
[http://pastebin.com/pQT32Crx]
For following definition:
{code}
<definition name="template" template="/WEB-INF/views/template.jsp">
<put-list-attribute name="scripts" cascade="true">
<add-attribute value="mstatic/js/form-validation-lang-hu.js" />
<add-attribute value="mstatic/js/jquery.core.min.js" />
<add-attribute value="mstatic/js/scripts.min.js" />
<!--other attributes-->
</put-list-attribute>
</definition>
{code}
Cascade attributes are duplicated:
!https://s31.postimg.org/9z8fr06ux/image.png!
was:
The problem concerns {code:java} CachingLocaleUrlDefinitionDAO.getDefinitions(Locale customizationKey) {code}
which lacks synchronization.
To reproduce the bug:
# Set up few clients with different Accept-Language headers
# Make the clients perform many request in short time (check out jmeter script attached below)
# the retValue contains entries with definitions with cascade attirbutes whose elements are duplicated.
We *fixed it by marking getDefinitions method synchronized*.
Here is jmeter script to reproduce bug:
[http://pastebin.com/pQT32Crx]
For following definitions:
{code}
<definition name="template" template="/WEB-INF/views/template.jsp">
<put-list-attribute name="scripts" cascade="true">
<add-attribute value="mstatic/js/form-validation-lang-hu.js" />
<add-attribute value="mstatic/js/jquery.core.min.js" />
<add-attribute value="mstatic/js/scripts.min.js" />
<!--other attributes-->
</put-list-attribute>
</definition>
{code}
Cascade attributes are duplicated:
!https://s31.postimg.org/9z8fr06ux/image.png!
> Definition cascade attributes duplicated values under high load
> ---------------------------------------------------------------
>
> Key: TILES-585
> URL: https://issues.apache.org/jira/browse/TILES-585
> Project: Tiles
> Issue Type: Bug
> Components: tiles-core
> Affects Versions: 3.0.5
> Reporter: Jakub Dziworski
> Priority: Critical
>
> The problem concerns {code:java} CachingLocaleUrlDefinitionDAO.getDefinitions(Locale customizationKey) {code}
> which lacks synchronization.
> To reproduce the bug:
> # Set up few clients with different Accept-Language headers
> # Make the clients perform many request in short time (check out jmeter script attached below)
> # the retValue contains entries with definitions with cascade attirbutes whose elements are duplicated.
> We *fixed it by marking getDefinitions method synchronized*.
> Here is jmeter script to reproduce bug:
> [http://pastebin.com/pQT32Crx]
> For following definition:
> {code}
> <definition name="template" template="/WEB-INF/views/template.jsp">
> <put-list-attribute name="scripts" cascade="true">
> <add-attribute value="mstatic/js/form-validation-lang-hu.js" />
> <add-attribute value="mstatic/js/jquery.core.min.js" />
> <add-attribute value="mstatic/js/scripts.min.js" />
> <!--other attributes-->
> </put-list-attribute>
> </definition>
> {code}
> Cascade attributes are duplicated:
>
> !https://s31.postimg.org/9z8fr06ux/image.png!
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)