Confluence: Rebuilding the Ancestor Table


Occasionally, the ancestor table corrupts in Confluence. The consequence of that is users will lose access to the child pages under their spaces. It happened once after we upgraded our Confluence server. Not sure if the upgrade caused that, or just a coincidence.

To confirm if you have corrupted ancestor table, run the the following SQL query against your database. If you get any non-empty returns, then it mean you are having a corrupted ancestor table.

SELECT A.ANCESTORID, A.DESCENDENTID, COUNT(A.DESCENDENTID)
FROM CONFANCESTORS A, CONTENT B
WHERE B.CONTENTID = A.DESCENDENTID
GROUP BY A.ANCESTORID, A.DESCENDENTID HAVING COUNT(A.DESCENDENTID) != 1
ORDER BY 3 DESC

To fix the issue:

  1. Backup your database.
  2. Click ‘Rebuild Ancestor Table’ on the page https://confluence-site-name/admin/permissions/pagepermsadmin.action. It will take a few minutes depending on your instance size. During the rebuilding, user may not have permission to create new contents.
  3. Go to https://confluence-site-name/admin/cache/showStatistics.action, then flush the ‘Inherited Content Permissions’ cache.

Reference: https://confluence.atlassian.com/doc/rebuilding-the-ancestor-table-153948.html

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s