Cache Management User Interface fails to update correctly to override properties

XMLWordPrintable

    • 2
    • Severity 3 - Minor
    • 2

      In Confluence Data Center, when a Cache Management value is overrides, the value is stored within the Shared Home directory under the $SharedHom/config/cache-settings-overrides.properties file. This file value is persisted into the Administrator's user interface when the update is made and is persisted to the file. However, the actual value does not show in the Administrator's UI once the nodes are restarted at the application level.

      Steps to reproduce the issue

      The following steps will easily reproduce the issue for you:

      • Login to any node of Confluence Data Center
      • Go to General Configuration > Cache Management
      • Click on the Advanced View
      • Choose the cache entry for Content Attachments
      • Adjust the size to 2 and observe the 0/2 value
      • Save the change
      • Observe that the change has persisted to both nodes in the Cache Managment Advanced View
      • Observe the file cache-settings-overrides.properties has the field adjusted to 2
      • /var/atlassian/shared-home6/config$ vi cache-settings-overrides.properties
        #Saved by com.atlassian.confluence.cache.DefaultCacheSettingsManager
        #Thu Jan 11 13:43:46 CST 2018
        cache.maxEntriesLocalHeap.com.atlassian.confluence.core.ContentEntityObject.attachments_v5=2
      • Shutdown both nodes in the Cluster
      • Verify that the file cache-settings-overrides.properties has not changed
      • Wait for the nodes to go offline
      • Restart the nodes, one first, then a few seconds later the second node
      • Navigate to to General Configuration > Cache Management
      • Click on the Advanced View
      • Observe that the UI now shows the 0/25000 value again
      • Move to a test space
      • Create a Test Upload page
      • Add an Upload attachment macro
      • Attempt to upload 3 or more attachments
      • You should receive two (2) successful uploads, with an additional failure
      • You exceeded the cache set by the override, and now the issue is occurring because the override file is in control as we have stipulated.

      Therefore, the UI is showing a hard-coded default value, and the changes that you make to the cache persist as we expected them to, although there is a display issue that needs to be addressed with our developers to correct the value to pull from the overrides when present in the shared home.

      Screen Captures

       Original Cache:

       

      Updated Cache:

      After Restart

      Cache Exceeded ERROR:

       

      Workaround

       

      An easy workaround for this would be to access the cache-settings-overrides.properties file mentioned above (usually in the shared-home folder of the installation) and remove the "_v5" suffix from the each cache name that has it.
      For example, change this:

      cache.maxEntriesLocalHeap.com.atlassian.confluence.core.ContentEntityObject.attachments_v5=2
      

      To this:

      cache.maxEntriesLocalHeap.com.atlassian.confluence.core.ContentEntityObject.attachments=2
      

      Settings will take effect the next time that the caches are restarted.
      (Note that 2 as a cache size is not valid, a minimum of 50 is enforced. This is just an example.)

        1. updated.png
          updated.png
          10 kB
        2. original.png
          original.png
          12 kB
        3. attachment-upload-fail.png
          attachment-upload-fail.png
          36 kB
        4. after-restart.png
          after-restart.png
          12 kB

            Assignee:
            Mark Bereznitsky
            Reporter:
            chucktalk (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: