Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-25122

Optimize the reindexing process when upgrading thru multiple versions of JIRA

    XMLWordPrintable

Details

    • We collect Jira feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

    Description

      NOTE: This suggestion is for JIRA Server. Using JIRA Cloud? See the corresponding suggestion.

      When upgrading from JIRA 4.0.2 to 4.3.3 the JIRA database upgrade process that is run on first startup performs four separate reindex operations, all four of which are extraneous for a typical upgrade and incur many hours of critical down time for large JIRA instances. Due to the fact that JIRA upgrades often involve admin-level changes that are going to require a manual re-index to be performed anyway, it is unnecessary for JIRA to perform a reindex at all as part of the database upgrade process, and it is definitely unnecessary for it to perform 4 of them. Please optimize this so at most one (optional) reindex is performed during the upgrade process.

      To work around this problem we removed the jira.option.indexing row from the propertyentry table in the JIRA database before starting the upgraded version of JIRA for the first time. After the upgrade is complete, go to Administration->Indexing in the JIRA interface and click "Activate" to re-add this row to the database and manually begin the reindexing process. Using this procedure resulted in a 50-minute upgrade process instead of nearly 5 hours. Your mileage may vary, but we did not notice any problems created by using this procedure.

      Please also update the JIRA documentation to note that the jira.option.indexing parameter in jira-application.properties no longer performs any function in an unmodified JIRA instance. (This setting in jira-application.properties is always overridden by the database entry, if present.)

      Workaround

      This only applies for instances pre 5.0 and should only ever be required if upgrading from a version of JIRA prior to 4.0 (e.g.: a two-step from 3.13.x to 4.4.5). Otherwise upgrading to the most recent version will contain this improvement.

      1. Disable the indexing:
        UPDATE propertynumber ps, 
               propertyentry pe 
        SET    ps.propertyvalue = 0 
        WHERE  pe.id = ps.id 
               AND pe.entity_name = 'jira.properties' 
               AND pe.propertytype = 1 
               AND pe.property_key = 'jira.option.indexing'
        
      2. Complete the upgrade and test.
      3. Re-enable the argument:
        UPDATE propertynumber ps, 
               propertyentry pe 
        SET    ps.propertyvalue = 1
        WHERE  pe.id = ps.id 
               AND pe.entity_name = 'jira.properties' 
               AND pe.propertytype = 0 
               AND pe.property_key = 'jira.option.indexing'
        

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              3f85ab128771 G B
              Votes:
              5 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: