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

DeleteDuplicateTasksUpgradeTask fails on Oracle when there are more than 1000 pages with tasks

    XMLWordPrintable

Details

    Description

      The DeleteDuplicateTasksUpgradeTask runs, and on very large instances with Oracle, the following query may have more than 1000 parameters in the IN clause, which is prohibited by Oracle.

      The query is:

      select abstractpa0_.CONTENTID as CONTENTID, abstractpa0_.CONTENTTYPE as CONTENTT2_, abstractpa0_.SPACEID as SPACEID, abstractpa0_.TITLE as TITLE, abstractpa0_.VERSION as VERSION, abstractpa0_.CREATOR as CREATOR, abstractpa0_.CREATIONDATE as CREATION6_, abstractpa0_.LASTMODIFIER as LASTMODI7_, abstractpa0_.LASTMODDATE as LASTMODD8_, abstractpa0_.VERSIONCOMMENT as VERSIONC9_, abstractpa0_.PREVVER as PREVVER, abstractpa0_.CONTENT_STATUS as CONTENT11_, abstractpa0_.CHILD_POSITION as CHILD_P13_, abstractpa0_.PARENTID as PARENTID from CONTENT abstractpa0_ where abstractpa0_.CONTENTTYPE in ('com.atlassian.confluence.pages.AbstractPage', 'PAGE', 'BLOGPOST') and ((abstractpa0_.CONTENTID in(? , ? , ? , ? ,
      

      Oracle reports the error which then causes the upgrade process to fail:

      2014-10-08 17:30:56,103 ERROR [lifecycle:thread-1] [sal.core.upgrade.PluginUpgrader] doUpgrade Upgrade failed: Hibernate operation: Could not execute query; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: ORA-01795: maximum number of expressions in a list is 1000
      

      The result is that the plugin upgrade does not complete successfully, and attempts to run all the plugin upgrade tasks on the next startup of Confluence. In large instances, this will cause a delay while Confluence attempts the upgrade, only to fail.

      Attachments

        Issue Links

          Activity

            People

              alwang Alice Wang (Inactive)
              dnorton@atlassian.com Dave Norton
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: