Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-81828

ActionContext instance cached on first call of method per instance of ActionContextCompatManager

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • No-Version
    • No-Version
    • Server - Platform
    • None

      Issue Summary

      ActionContext instance is retrieved and then cached upon first method call of an ActionContextCompatManager instance. This is problematic as the ActionContext instance should be unique per thread and thus request. It is cached per instance of ActionContextCompatManager.

      Affected version: confluence-compat-lib 1.5.3

      Steps to Reproduce

      1. Construct an ActionContextCompatManager instance.
      2. Call instance method put("key", "someValue")
      3. Call instance method get("key") on a different thread/request

      Expected Results

      Returns null

      Actual Results

      Returns "someValue"

      Workaround

      Given the ActionContext is cached per instance of ActionContextCompatManager, constructing a new ActionContextCompatManager per request is a potential workaround.

            [CONFSERVER-81828] ActionContext instance cached on first call of method per instance of ActionContextCompatManager

            Kusal Kithul-Godage made changes -
            QA Demo Status Original: Not Done [ 14330 ] New: Not Needed [ 14332 ]
            Resolution New: Fixed [ 1 ]
            Status Original: In Review [ 10051 ] New: Closed [ 6 ]

            We have released version 1.5.4 of confluence-compat-lib which contains the fix.

            Kusal Kithul-Godage added a comment - We have released version 1.5.4 of confluence-compat-lib which contains the fix.
            Kusal Kithul-Godage made changes -
            Remote Link New: This issue links to "Page (Atlassian Documentation)" [ 723360 ]
            Kusal Kithul-Godage made changes -
            Description Original: h3. Issue Summary

            In the case of Confluence 8+/Struts, the ActionContext instance is retrieved and then cached upon first method call of an ActionContextCompatManager instance. This is problematic as the ActionContext instance should be unique per thread and thus request. It is cached per instance of ActionContextCompatManager.

            Affected version: confluence-compat-lib 1.5.3
            h3. Steps to Reproduce
             # Construct an ActionContextCompatManager instance.
             # Call instance method put("key", "someValue")
             # Call instance method get("key") on a different thread/request

            h3. Expected Results

            Returns null
            h3. Actual Results

            Returns "someValue"
            h3. Workaround

            Given the ActionContext is cached per instance of ActionContextCompatManager, constructing a new ActionContextCompatManager per request is a potential workaround.
            New: h3. Issue Summary

            ActionContext instance is retrieved and then cached upon first method call of an ActionContextCompatManager instance. This is problematic as the ActionContext instance should be unique per thread and thus request. It is cached per instance of ActionContextCompatManager.

            Affected version: confluence-compat-lib 1.5.3
            h3. Steps to Reproduce
             # Construct an ActionContextCompatManager instance.
             # Call instance method put("key", "someValue")
             # Call instance method get("key") on a different thread/request

            h3. Expected Results

            Returns null
            h3. Actual Results

            Returns "someValue"
            h3. Workaround

            Given the ActionContext is cached per instance of ActionContextCompatManager, constructing a new ActionContextCompatManager per request is a potential workaround.
            Kusal Kithul-Godage made changes -
            Description Original: h3. Issue Summary

            In the case of Confluence 8.0/Struts, the ActionContext instance is retrieved and then cached upon first method call of an ActionContextCompatManager instance. This is problematic as the ActionContext instance should be unique per thread and thus request. It is cached per instance of ActionContextCompatManager.

            Affected version: confluence-compat-lib 1.5.3
            h3. Steps to Reproduce
             # Construct an ActionContextCompatManager instance.
             # Call instance method put("key", "someValue")
             # Call instance method get("key") on a different thread/request

            h3. Expected Results

            Returns null
            h3. Actual Results

            Returns "someValue"
            h3. Workaround

            Given the ActionContext is cached per instance of ActionContextCompatManager, constructing a new ActionContextCompatManager per request is a potential workaround.
            New: h3. Issue Summary

            In the case of Confluence 8+/Struts, the ActionContext instance is retrieved and then cached upon first method call of an ActionContextCompatManager instance. This is problematic as the ActionContext instance should be unique per thread and thus request. It is cached per instance of ActionContextCompatManager.

            Affected version: confluence-compat-lib 1.5.3
            h3. Steps to Reproduce
             # Construct an ActionContextCompatManager instance.
             # Call instance method put("key", "someValue")
             # Call instance method get("key") on a different thread/request

            h3. Expected Results

            Returns null
            h3. Actual Results

            Returns "someValue"
            h3. Workaround

            Given the ActionContext is cached per instance of ActionContextCompatManager, constructing a new ActionContextCompatManager per request is a potential workaround.
            Kusal Kithul-Godage made changes -
            Description Original: h3. Issue Summary

            The ActionContext instance is retrieved and then cached upon first method call of an ActionContextCompatManager instance. This is problematic as the ActionContext instance should be unique per thread and thus request. It is cached per instance of ActionContextCompatManager.

            Affected version: confluence-compat-lib 1.5.3
            h3. Steps to Reproduce
             # Construct an ActionContextCompatManager instance.
             # Call instance method put("key", "someValue")
             # Call instance method get("key") on a different thread/request

            h3. Expected Results

            Returns null
            h3. Actual Results

            Returns "someValue"
            h3. Workaround

            Given the ActionContext is cached per instance of ActionContextCompatManager, constructing a new ActionContextCompatManager per request is a potential workaround.
            New: h3. Issue Summary

            In the case of Confluence 8.0/Struts, the ActionContext instance is retrieved and then cached upon first method call of an ActionContextCompatManager instance. This is problematic as the ActionContext instance should be unique per thread and thus request. It is cached per instance of ActionContextCompatManager.

            Affected version: confluence-compat-lib 1.5.3
            h3. Steps to Reproduce
             # Construct an ActionContextCompatManager instance.
             # Call instance method put("key", "someValue")
             # Call instance method get("key") on a different thread/request

            h3. Expected Results

            Returns null
            h3. Actual Results

            Returns "someValue"
            h3. Workaround

            Given the ActionContext is cached per instance of ActionContextCompatManager, constructing a new ActionContextCompatManager per request is a potential workaround.
            Kusal Kithul-Godage made changes -
            Description Original: h3. Issue Summary

            The ActionContext instance is retrieved and then cached upon first method call of an ActionContextCompatManager instance. This is problematic as the ActionContext instance should be unique per thread and thus request. It is cached per instance of ActionContextCompatManager.

            Affected version: confluence-compat-lib 1.5.3
            h3. Steps to Reproduce
             # Construct an ActionContextCompatManager instance.
             # Call an instance method such as getContextMap() and add a value
             # Call the same instance method on a different thread/request

            h3. Expected Results

            Returns a different map instance
            h3. Actual Results

            Returns the same map instance
            h3. Workaround

            Given the ActionContext is cached per instance of ActionContextCompatManager, constructing a new ActionContextCompatManager per request is a potential workaround.
            New: h3. Issue Summary

            The ActionContext instance is retrieved and then cached upon first method call of an ActionContextCompatManager instance. This is problematic as the ActionContext instance should be unique per thread and thus request. It is cached per instance of ActionContextCompatManager.

            Affected version: confluence-compat-lib 1.5.3
            h3. Steps to Reproduce
             # Construct an ActionContextCompatManager instance.
             # Call instance method put("key", "someValue")
             # Call instance method get("key") on a different thread/request

            h3. Expected Results

            Returns null
            h3. Actual Results

            Returns "someValue"
            h3. Workaround

            Given the ActionContext is cached per instance of ActionContextCompatManager, constructing a new ActionContextCompatManager per request is a potential workaround.
            Kusal Kithul-Godage made changes -
            Fix Version/s New: No-Version [ 66670 ]
            QA Kickoff Status Original: Not Done [ 14234 ] New: Not Needed [ 14236 ]
            Testing Notes New: Unit test coverage added and manually tested in product
            Status Original: In Progress [ 3 ] New: In Review [ 10051 ]
            Kusal Kithul-Godage made changes -
            Remote Link New: This issue links to "Pull request: confluence-compat-lib#13 (Web Link)" [ 723425 ]
            Kusal Kithul-Godage made changes -
            Remote Link New: This issue links to "Confluence Bundled Libraries › Confluence Compatibility Library › issue-CONFSERVER-81828-fix-caching (server-syd-bamboo)" [ 723402 ]

              854eef6f5746 Kusal Kithul-Godage
              854eef6f5746 Kusal Kithul-Godage
              Affected customers:
              8 This affects my team
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: