java.lang.RuntimeException: Expected exactly one rank for 11530 / 21202 but found 2

Atlassian JIRA | Zulfadli Noor Sazali [Atlassian] | 2 years ago
  1. 0

    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: {noformat} 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) {noformat} 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

    Atlassian JIRA | 2 years ago | Daniel Leng
    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]
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    We were using JIRa Agile 6.3.5 and upgraded to 6.4.0.9 and after upgrade we see following error in logs and Agile is not usable now. 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=12600] 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) at com.atlassian.jira.issue.index.DefaultIndexManager.reIndexAll(DefaultIndexManager.java:303) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.atlassian.util.profiling.object.ObjectProfiler.profiledInvoke(ObjectProfiler.java:83) at com.atlassian.jira.config.component.SwitchingInvocationHandler.invoke(SwitchingInvocationHandler.java:28) at com.sun.proxy.$Proxy157.reIndexAll(Unknown Source) at com.atlassian.jira.util.index.CompositeIndexLifecycleManager.reIndexAll(CompositeIndexLifecycleManager.java:56) at com.atlassian.jira.web.action.admin.index.ReIndexAsyncIndexerCommand.doReindex(ReIndexAsyncIndexerCommand.jav

    Atlassian JIRA | 2 years ago | Ankur Dhawan
    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=12600]
  4. 0

    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: {noformat} 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) {noformat} 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

    Atlassian JIRA | 2 years ago | Daniel Leng [Atlassian]
    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]

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.RuntimeException

      Expected exactly one rank for 11530 / 21202 but found 2

      at com.atlassian.greenhopper.manager.lexorank.LexoRankDaoImpl.findByFieldAndIssueId()
    2. com.atlassian.greenhopper
      LexoRankDaoImpl.findByFieldAndIssueId
      1. com.atlassian.greenhopper.manager.lexorank.LexoRankDaoImpl.findByFieldAndIssueId(LexoRankDaoImpl.java:271)
      1 frame