Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-41411

Rebuilding ancestors table is returning an inverse order

    XMLWordPrintable

Details

    Description

      NOTE: This bug report is for Confluence Server. Using Confluence Cloud? 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);
      

      Attachments

        Issue Links

          Activity

            People

              nhdang Nhan Dang
              nhdang Nhan Dang
              Votes:
              1 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: