Rebuilding the Ancestor Table
The ancestor
table records the parent and descendant (child) relationship between pages. It is also used when determining whether a page will inherit view restrictions from a parent page.
Occasionally records in the ancestor table can become corrupted. When this happens you will need to rebuild the ancestor table.
Rebuild the ancestor table
To rebuild the ancestor table:
- Back up your database.
- Use the following URL to access the Page Level Permissions page
<your-site>/admin/permissions/pagepermsadmin.action
Choose Rebuild ancestor table.
- Go to > General Configuration > Cache Management.
- Flush the Inherited Content Permissions cache.
This process takes about ten minutes for an average size site, and you may not be able to save new content during this time. We recommend you take a full backup of your database and complete this process during a maintenance window.
Track progress of the rebuild
To track the progress of the ancestor table rebuild:
- Go to > General Configuration > Logging & Profiling
Add the following entry, setting the logging level to INFO
com.atlassian.confluence.pages.ancestors.HibernatePageAncestorManager
See Configuring Logging for more information.
Open
<confluence_home>/logs/atlassian-confluence.log
. You should now see additional ancestor table logging, similar to the example below:2018-07-25 20:48:56,202 INFO [http-nio-8666-exec-10] [confluence.pages.ancestors.HibernatePageAncestorManager] rebuild Started 2018-07-25 20:48:56,213 INFO [http-nio-8666-exec-10] [confluence.pages.ancestors.HibernatePageAncestorManager] clearHibernateCollectionCache Evicting the contents of Hibernate 'com.atlassian.confluence.pages.Page.ancestors' collection cache 2018-07-25 20:48:56,235 INFO [http-nio-8666-exec-10] [confluence.pages.ancestors.HibernatePageAncestorManager] apply Stored ancestors for child pages... 16/16 2018-07-25 20:48:56,236 INFO [http-nio-8666-exec-10] [confluence.pages.ancestors.HibernatePageAncestorManager] rebuild Ancestors persisted to database in 11 ms 2018-07-25 20:48:56,237 INFO [http-nio-8666-exec-10] [confluence.pages.ancestors.HibernatePageAncestorManager] rebuild Complete!