Uploaded image for project: 'Central AI/Rovo'
  1. Central AI/Rovo
  2. AI-591

Progress report for rebuilding the ancestor table

    XMLWordPrintable

Details

    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    Description

      NOTE: This suggestion is for Confluence Cloud. Using Confluence Server? See the corresponding suggestion.

      Problem

      Administrators sometimes need to rebuild the ancestor table. This process has no progress report on the UI, moreover by default it does not log anything.

      This is problematic, as in many cases the reverse-proxy used in front of Confluence will timeout the client request, however this does not terminate the java thread processing the rebuild. So problems to tackle here:

      • Progress bar on the admin UI to report the status
        • Preferably putting the task as a one-time scheduled job, so that if the proxy times out, the status can still be monitored
      • Log the start and the end of the process
        • Consider logging the percentage of the progress

      Workaround

      • You can enable debug logging for the class com.atlassian.confluence.pages.ancestors, which then will show the progress with the following format:
        2015-08-14 10:27:12,883 DEBUG [http-nio-8090-exec-1] [confluence.admin.actions.ConfigureLog4jAction] add New logger [ com.atlassian.confluence.pages.ancestors ] saved
        2015-08-14 10:27:30,997 INFO [http-nio-8090-exec-9] [confluence.pages.ancestors.HibernatePageAncestorManager] clearAncestorsCollectionCache Clearing ancestors cache ...
        2015-08-14 10:27:30,998 INFO [http-nio-8090-exec-9] [confluence.pages.ancestors.HibernatePageAncestorManager] clearAncestorsCollectionCache Ancestors cache cleared.
        2015-08-14 10:27:31,000 INFO [http-nio-8090-exec-9] [confluence.pages.ancestors.HibernatePageAncestorManager] rebuild updating Learn the wonders of autoconvert (step 7 of 9)[98305] (1/9)
        2015-08-14 10:27:31,001 INFO [http-nio-8090-exec-9] [confluence.pages.ancestors.HibernatePageAncestorManager] rebuild updating Lay out your page (step 6 of 9)[98306] (2/9)
        2015-08-14 10:27:31,001 INFO [http-nio-8090-exec-9] [confluence.pages.ancestors.HibernatePageAncestorManager] rebuild updating Prettify the page with an image (step 4 of 9)[98307] (3/9)
        2015-08-14 10:27:31,002 INFO [http-nio-8090-exec-9] [confluence.pages.ancestors.HibernatePageAncestorManager] rebuild updating Tell people what you think in a comment (step 8 of 9)[98308] (4/9)
        2015-08-14 10:27:31,002 INFO [http-nio-8090-exec-9] [confluence.pages.ancestors.HibernatePageAncestorManager] rebuild updating Get serious with a table (step 5 of 9)[98309] (5/9)
        2015-08-14 10:27:31,002 INFO [http-nio-8090-exec-9] [confluence.pages.ancestors.HibernatePageAncestorManager] rebuild updating What is Confluence? (step 1 of 9)[98311] (6/9)
        2015-08-14 10:27:31,003 INFO [http-nio-8090-exec-9] [confluence.pages.ancestors.HibernatePageAncestorManager] rebuild updating A quick look at the editor (step 2 of 9)[98312] (7/9)
        2015-08-14 10:27:31,003 INFO [http-nio-8090-exec-9] [confluence.pages.ancestors.HibernatePageAncestorManager] rebuild updating Let's edit this page (step 3 of 9)[98313] (8/9)
        2015-08-14 10:27:31,003 INFO [http-nio-8090-exec-9] [confluence.pages.ancestors.HibernatePageAncestorManager] rebuild updating Share your page with a team member (step 9 of 9)[98314] (9/9)
        

        See: https://confluence.atlassian.com/display/CONFKB/How+to+enable+Ancestor+table+rebuild+progress+logging

      • You can run the following query to compare the CONTENT table to the ancestor table, to see if all the entries are represented already. However, on large instances this query may run way too long, so it is not appropriate for progress monitoring in such cases. When all the entries here return 1 instead of 0, the process can be considered complete.
        SELECT A.ANCESTORID, A.DESCENDENTID, COUNT(A.DESCENDENTID)
        FROM CONFANCESTORS A, CONTENT B
        WHERE B.CONTENTID = A.DESCENDENTID
        GROUP BY A.ANCESTORID, A.DESCENDENTID
        ORDER BY 3 DESC;

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              pkoczan Peter Koczan (Inactive)
              Votes:
              3 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: