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

Performance for CSV importer - make indexing configurable

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      Importing lots (10,000 or more?) can take days.

      Proposed solution:
      Reindexing seems to be a big part of the problem. It'd be nice to make the reindex interval be configurable from jira.properties rather than hard-coded:

      From com.atlassian.jira.imports.importer.impl.ImportSettings:

      private int maxIssuePerReindex = 50;
      

      From DefaultJiraDataImporter:

      ...
          private void importIssues(final ExternalProject externalProject)
         {
      ...
       // Reindex if required
                  if (unindexedIssueGvs.size() >= settings.getMaxIssuePerReindex())
                  {
                      ImportUtils.setIndexIssues(true);
                      reindexIssues();
                      ImportUtils.setIndexIssues(false);
                  }
      ...
          private void reindexIssues()
          {
              try
              {
                  log.newLine();
                  log.log("Reindexing last " + unindexedIssueGvs.size() + " issues imported ...");
                  final long l = ManagerFactory.getIndexManager().reIndexIssues(unindexedIssueGvs);
                  log.log("Reindexing took  " + l + "ms.");
      
                  log.newLine();
      
                  unindexedIssueGvs.clear();
              }
              catch (final IndexException e)
              {
                  log.fail("Reindexing failed", e);
              }
          }
      

            Unassigned Unassigned
            jlargman Jeremy Largman
            Archiver:
            mandreacchio Michael Andreacchio

              Created:
              Updated:
              Resolved:
              Archived: