Uploaded image for project: 'Tiles'
  1. Tiles
  2. TILES-585

Definition cascade attributes duplicated values under high load

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Reopened
    • Critical
    • Resolution: Unresolved
    • 3.0.5
    • 3.1.x, 3.0.7
    • tiles-core
    • None
    • Important

    Description

      The problem concerns

       CachingLocaleUrlDefinitionDAO.getDefinitions(Locale customizationKey) 

      which lacks synchronization.

      To reproduce the bug:

      1. Set up few clients with different Accept-Language headers
      2. Make the clients perform many request in short time (check out jmeter script attached below)
      3. 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:

      <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>
      

      Cascade attributes are duplicated:

      Attachments

        1. TILES-585.patch
          2 kB
          Michael Semb Wever

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jakub.dziworski Jakub Dziworski
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated: