Page diffs fail because the confluence-coherence-cache-config-clustered.xml file is not being updated in clustered upgrades

XMLWordPrintable

      Problem

      When upgrading a Confluence cluster, the cache file in the home directory is not modified at all: <confluence_home>/config/confluence-coherence-cache-config-clustered.xml. This is a problem because page diffs will fail after the upgrade to 3.5.x or 4.1.x. Another related consequence is that notifications on page edits will not be sent to watchers, since the page diff cannot be generated.

      More details

      A vanilla install of 3.5.x cluster cache configs shows the following:

      <cache-mapping>
        <cache-name>com.atlassian.confluence.diffs</cache-name>
        <scheme-name>local:default</scheme-name>
      </cache-mapping>
      

      However, users who upgrade from 3.4.x or below to 3.5.x will not have this in their confluence-coherence-cache-config-clustered.xml, thus encountering the stacktrace described in CONF-22548 when trying to do a page diff.

      Additional to that, a vanilla Confluence 4.1.x cluster has the following:

      <cache-mapping>
        <cache-name>com.atlassian.confluence.html.diffs</cache-name>
        <scheme-name>local:default</scheme-name>
      </cache-mapping>
      

      Again, because this would be missing in an upgraded 4.1.x cluster, page diffs will fail with a similar stacktrace:

      2012-06-11 10:12:42,996 ERROR [http-8080-9] [atlassian.confluence.servlet.ConfluenceServletDispatcher] sendError Could not execute action
       -- url: /wiki/pages/diffpages.action | userName: us340392 | referer: http://example.com/wiki/display/DS/Home
      java.lang.IllegalArgumentException: Resource is not serializable: Key=com.atlassian.confluence.diff.DiffKey@459b8c14, Value=com.atlassian.util.concurrent.SettableFuture@c90883e
      	at com.tangosol.coherence.component.util.daemon.queueProcessor.service.ReplicatedCache.updateResource(ReplicatedCache.CDB:7)
      	at com.tangosol.coherence.component.util.CacheHandler.put(CacheHandler.CDB:11)
      	at com.tangosol.coherence.component.util.CacheHandler.put(CacheHandler.CDB:1)
      	at com.tangosol.coherence.component.util.SafeNamedCache.put(SafeNamedCache.CDB:1)
      	at com.atlassian.confluence.cache.tangosol.TangosolCache.put(TangosolCache.java:41)
      	at com.atlassian.confluence.diff.DaisyHtmlDiffer.createOrGetFutureDiff(DaisyHtmlDiffer.java:137)
      	at com.atlassian.confluence.diff.DaisyHtmlDiffer.diff(DaisyHtmlDiffer.java:95)
      	at com.atlassian.confluence.diff.WikiConvertingHtmlDiffer.diff(WikiConvertingHtmlDiffer.java:31)
      	at com.atlassian.confluence.pages.actions.AbstractDiffPagesAction.execute(AbstractDiffPagesAction.java:83)
      

      Workaround

      For customers that upgraded to 3.5.x, add the following to your <confluence_home>/config/confluence-coherence-cache-config-clustered.xml, inside the <caching-scheme-mapping> tags:

      <cache-mapping>
        <cache-name>com.atlassian.confluence.diffs</cache-name>
        <scheme-name>local:default</scheme-name>
      </cache-mapping>
      

      For customers that upgraded to 4.1.x or higher, you will need to add the following, inside the <caching-scheme-mapping> tags:

      <cache-mapping>
        <cache-name>com.atlassian.confluence.diffs</cache-name>
        <scheme-name>local:default</scheme-name>
      </cache-mapping>
      
      <cache-mapping>
        <cache-name>com.atlassian.confluence.html.diffs</cache-name>
        <scheme-name>local:default</scheme-name>
      </cache-mapping>
      

      In both cases, all nodes of the cluster should be restarted after making the changes.

              Assignee:
              Petro Semeniuk (Inactive)
              Reporter:
              Robert Chang (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: