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

          Form Name

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

            Renata Dornelas made changes -
            Remote Link Original: This issue links to "Page (Atlassian Documentation)" [ 128686 ]
            Bugfix Automation Bot made changes -
            Minimum Version New: 6.04
            Owen made changes -
            Workflow Original: JAC Bug Workflow v2 [ 2852048 ] New: JAC Bug Workflow v3 [ 2937012 ]
            Status Original: Resolved [ 5 ] New: Closed [ 6 ]
            Owen made changes -
            Workflow Original: JIRA Bug Workflow w Kanban v7 - Restricted [ 2545959 ] New: JAC Bug Workflow v2 [ 2852048 ]
            Ignat (Inactive) made changes -
            Workflow Original: JIRA Bug Workflow w Kanban v6 - Restricted [ 1548165 ] New: JIRA Bug Workflow w Kanban v7 - Restricted [ 2545959 ]
            Confluence Escalation Bot (Inactive) made changes -
            Labels Original: affects-server fixme lexorank lexorank-perf warranty New: affects-cloud affects-server fixme lexorank lexorank-perf warranty
            Confluence Escalation Bot (Inactive) made changes -
            Labels Original: fixme lexorank lexorank-perf warranty New: affects-server fixme lexorank lexorank-perf warranty
            Owen made changes -
            Workflow Original: JIRA Bug Workflow w Kanban v6 [ 909122 ] New: JIRA Bug Workflow w Kanban v6 - Restricted [ 1548165 ]
            Michael Andreacchio made changes -
            Remote Link Original: This issue links to "Page (Atlassian Documentation)" [ 128801 ] New: This issue links to "Page (Atlassian Documentation)" [ 128801 ]
            Michael Andreacchio made changes -
            Remote Link Original: This issue links to "Page (Atlassian Documentation)" [ 74277 ] New: This issue links to "Page (Atlassian Documentation)" [ 74277 ]

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

                Created:
                Updated:
                Resolved: