Rebuilding ancestors table is returning an inverse order

XMLWordPrintable

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

      Back in CONF-38939, a change was made to improve performance of rebuilding the ancestors table. Unfortunately, that change also reversed the original order of the records in that table.

      Originally, all ancestors of a page were sorted by the order from Space home page down to its intermediate parent page. Since CONF-38939, the new order has been from the intermediate parent page up to Space home page. This reversed order has prevented the code to render page tree in Page Hierarchy (and maybe more) from working correctly.

      This order is enforced in com.atlassian.confluence.pages.ancestors.AncestorRebuildCalculator.storeAncestors()

              List<Long> parentAncestors = storeAncestors(parentId, visited);
      
              List<Long> ancestorList = Lists.newArrayList(parentId);
              ancestorList.addAll(parentAncestors);
      

            Assignee:
            Nhan Dang
            Reporter:
            Nhan Dang
            Votes:
            1 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: