Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-13500

DocumentTree macro fires a long running query for spaces with too many pages

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Critical
    • None
    • 7.4.3
    • Index
    • None
    • Unknown

    Description

      When clicking the 'caret-down' on the hierarchy breadcrumb or explicitly using the documentTree macro in a page that has a huge amount of children/siblings, it fires a long running query that causes the Aurora AWS database to spike to alarming levels of 80%+ CPU usage.

      While checking the processlist, this query was running for more than 30 minutes and had to be killed to return the DB CPU levels to normal levels (around 5%):
      "select distinct case when space.parent = 'XWiki' then space.name else doc.name end, case when spa..."
      (Note that I didn't have slow query logging enabled at the time of the issue so I
      unfortunately don't have the full query being executed, but it will be enabled soon and I'll update this JIRA with the complete query)

      Attachments

        Issue Links

          Activity

            People

              mflorea Marius Dumitru Florea
              lucaslima Lucas Lima
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: