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:
- Backup your database.
- 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.
- 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