Its still possible for JIRA Agile's upgrade tasks to create duplicated LexoRank fields, and this is causing re-indexing to fail with the following errors:

      java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: Expected exactly 2 rows; the maximum marker row and the lowest ranked row for rank field[id=10300]
          at com.atlassian.jira.index.FutureResult.await(FutureResult.java:35)
          at com.atlassian.jira.index.CompositeResultBuilder$CompositeResult.await(CompositeResultBuilder.java:82)
          at com.atlassian.jira.issue.index.DefaultIndexManager.doIndexIssuesInBatchMode(DefaultIndexManager.java:857)
          at com.atlassian.jira.issue.index.DefaultIndexManager.doStopTheWorldReindex(DefaultIndexManager.java:827)
          at com.atlassian.jira.issue.index.DefaultIndexManager.reIndexAll(DefaultIndexManager.java:337)
          ...
      Caused by: java.util.concurrent.ExecutionException: java.lang.RuntimeException: Expected exactly 2 rows; the maximum marker row and the lowest ranked row for rank field[id=10300]
          at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source)
          at java.util.concurrent.FutureTask.get(Unknown Source)
          at com.atlassian.jira.index.FutureResult.await(FutureResult.java:31)
          ... 25 more
      Caused by: java.lang.RuntimeException: Expected exactly 2 rows; the maximum marker row and the lowest ranked row for rank field[id=10300]
          at com.atlassian.greenhopper.manager.lexorank.LexoRankDaoImpl.getMaximumMarkerRowAndPreviousRow(LexoRankDaoImpl.java:393)
          at com.atlassian.greenhopper.service.lexorank.LexoRankOperation.rankInitially(LexoRankOperation.java:169)
          at com.atlassian.greenhopper.service.lexorank.LexoRankOperation.execute(LexoRankOperation.java:111)
          at com.atlassian.greenhopper.service.lexorank.LexoRankService.performRankOperation(LexoRankService.java:239)
          ...
          at com.atlassian.greenhopper.customfield.lexorank.LexoRankIndexer.getLexoRankValue(LexoRankIndexer.java:72)
          at com.atlassian.greenhopper.customfield.lexorank.LexoRankIndexer.getIndexValue(LexoRankIndexer.java:65)
          at com.atlassian.greenhopper.customfield.lexorank.LexoRankIndexer.addDocumentFields(LexoRankIndexer.java:51)
          at com.atlassian.greenhopper.customfield.lexorank.LexoRankIndexer.addDocumentFieldsSearchable(LexoRankIndexer.java:39)
      

      It is currently unknown how JIRA Agile is creating these duplicated rank fields. You can easily identify this by navigating to Administration >> Issues >> Custom Fields, check if there are multiple Rank custom fields of type Global Rank. (Not obsolete)

      When you have multiple rank fields, JIRA may be using the wrong Rank field while indexing issues. (The rank field that was not used in the balancing) So while indexing JIRA fails to find the maximum marker and minimum row.

      A KB has been created describing this in detail: https://confluence.atlassian.com/display/AGILEKB/Cannot+reindex+jira+due+to+Expected+exactly+2+rows+the+maximum+marker+row+and+the+lowest+ranked+row+for+rank+field

            [JSWSERVER-10985] Duplicated LexoRank fields causes indexing in JIRA to fail

            No work has yet been logged on this issue.

              Unassigned Unassigned
              dleng Daniel Leng (Inactive)
              Affected customers:
              0 This affects my team
              Watchers:
              10 Start watching this issue

                Created:
                Updated:
                Resolved: