Uploaded image for project: 'Jira Software Data Center'
  1. Jira Software Data Center
  2. JSWSERVER-11170

After installing JAG for the first time Lexorank indexer runs in the background but you are able to run a full re-index at the same time

      Steps to reproduce:

      1. Install a new version of JAG in an environment where no JAG was installed before.
      2. Go to "Indexing" in JIRA.
      3. Run a full re-index or a background re-index

      Expected behaviour: You should be informed that lexorank indexer is running and running a full re-index at the same time will slow the performance.

      When a full re-index or background re-index runs immediately after installing JAG you are going to see how the time and performance of the app degrades because it takes twice the time to do everything.

      2 threads are doing the same work at the same time.

      Work around

      If you want to migrate from JIRA Agile < 6.4 to JIRA Agile >= 6.4.5, and you want to avoid a background re-index being triggered by JIRA Agile's upgrade task GhUpgradeTask044, you can set the Java System Property upgrade.reindex.allowed to false.

      Notes

      This issue only tracks the scenario when the first population/migration of rank values is happening in JIRA Agile after installing JIRA Agile >= 6.4. We have tracked (and resolved) a separate issue around not letting balancing and foreground re-indexes happen at the same time (the re-index cancels any balancing jobs until it is done).

            [JSWSERVER-11170] After installing JAG for the first time Lexorank indexer runs in the background but you are able to run a full re-index at the same time

            ckhatchikian ibosticky based on the above support case alone, I would say our initial hypothesis that the problem is related to re-indexes running concurrently during upgrade is wrong. We should go back through all support cases linked to this issue and check to see if they previously had attempted an upgrade to JIRA Agile 6.4+ and then subsequently downgraded.

            Also, the MSSQL-specific error message in the above support case is worrying and is seemingly unrelated to whether re-indexes are running concurrently. If "java.sql.DataTruncation: Data truncation" errors are being thrown frequently while attempting to generate rank initially values, then this would probably slow down re-indexing too, but it warrants its own investigation as to why the errors are being thrown in the first place.

            Michael Tokar added a comment - ckhatchikian ibosticky based on the above support case alone, I would say our initial hypothesis that the problem is related to re-indexes running concurrently during upgrade is wrong. We should go back through all support cases linked to this issue and check to see if they previously had attempted an upgrade to JIRA Agile 6.4+ and then subsequently downgraded. Also, the MSSQL-specific error message in the above support case is worrying and is seemingly unrelated to whether re-indexes are running concurrently. If "java.sql.DataTruncation: Data truncation" errors are being thrown frequently while attempting to generate rank initially values, then this would probably slow down re-indexing too, but it warrants its own investigation as to why the errors are being thrown in the first place.

            mtokar I think the best way to know if it is the correct way is if you go to the Indexing page and see the task running, if you don't see it there then we need to verify why you don't see it.

            Carlos Khatchikian added a comment - mtokar I think the best way to know if it is the correct way is if you go to the Indexing page and see the task running, if you don't see it there then we need to verify why you don't see it.

            ckhatchikian we initiate a JIRA background re-index in the following code:

            // JIRA 6.0-6.1 code
                public TaskDescriptor<IndexCommandResult> doBackgroundReindex()
                {
                    final String taskName = i18nHelper.getText("admin.indexing.jira.indexing");
                    final ReIndexBackgroundIndexerCommand command = new ReIndexBackgroundIndexerCommand(indexLifecycleManager, log, i18nHelper);
                    return taskManager.submitTask(command, taskName, new IndexTaskContext(), true);
                }
            
            // JIRA 6.2+ code
                public TaskDescriptor<IndexCommandResult> doBackgroundReindex()
                {
                    final String taskName = i18nHelper.getText("admin.indexing.jira.indexing");
                    final ReIndexBackgroundIndexerCommand command = new ReIndexBackgroundIndexerCommand(indexLifecycleManager, log, i18nHelper, i18nBeanFactory);
                    return taskManager.submitTask(command, taskName, new IndexTaskContext(), true);
                }
            

            Is this the correct way to trigger a background reindex programmatically via JIRA?

            Michael Tokar added a comment - ckhatchikian we initiate a JIRA background re-index in the following code: // JIRA 6.0-6.1 code public TaskDescriptor<IndexCommandResult> doBackgroundReindex() { final String taskName = i18nHelper.getText( "admin.indexing.jira.indexing" ); final ReIndexBackgroundIndexerCommand command = new ReIndexBackgroundIndexerCommand(indexLifecycleManager, log, i18nHelper); return taskManager.submitTask(command, taskName, new IndexTaskContext(), true ); } // JIRA 6.2+ code public TaskDescriptor<IndexCommandResult> doBackgroundReindex() { final String taskName = i18nHelper.getText( "admin.indexing.jira.indexing" ); final ReIndexBackgroundIndexerCommand command = new ReIndexBackgroundIndexerCommand(indexLifecycleManager, log, i18nHelper, i18nBeanFactory); return taskManager.submitTask(command, taskName, new IndexTaskContext(), true ); } Is this the correct way to trigger a background reindex programmatically via JIRA?

              Unassigned Unassigned
              ckhatchikian Carlos Khatchikian
              Affected customers:
              1 This affects my team
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: