Issues deleting JIRA issues

This is the exception I'm getting.

Best Regards and thank you in advance,
Simdea

com.atlassian.greenhopper.manager.lexorank.LexoRankIntegrityException: Expected exactly 2 rows; the maximum marker row and the lowest ranked row for rank field[id=10005]
com.atlassian.greenhopper.manager.lexorank.LexoRankIntegrityException: Expected exactly 2 rows; the maximum marker row and the lowest ranked row for rank field[id=10005]
at com.atlassian.greenhopper.manager.lexorank.LexoRankDaoImpl.getMaximumMarkerRowAndPreviousRow(LexoRankDaoImpl.java:369) [?:?]
at com.atlassian.greenhopper.service.lexorank.LexoRankOperation.rankInitially(LexoRankOperation.java:177) [?:?]
at com.atlassian.greenhopper.service.lexorank.LexoRankOperation.execute(LexoRankOperation.java:116) [?:?]
at com.atlassian.greenhopper.manager.lexorank.LexoRankManagerImpl.performRankOperation(LexoRankManagerImpl.java:300) [?:?]
at com.atlassian.greenhopper.manager.lexorank.LexoRankManagerImpl.getRankOrRankInitially(LexoRankManagerImpl.java:86) [?:?]
at com.atlassian.greenhopper.customfield.lexorank.LexoRankCFType.getValueFromIssue(LexoRankCFType.java:121) [?:?]
at com.atlassian.greenhopper.customfield.lexorank.LexoRankCFType.getValueFromIssue(LexoRankCFType.java:29) [?:?]
at com.atlassian.jira.issue.fields.ImmutableCustomField.getValue(ImmutableCustomField.java:349) [classes/:?]
at com.atlassian.jira.issue.managers.DefaultIssueDeleteHelper$DeletedIssueEventData.collectCustomFieldValues(DefaultIssueDeleteHelper.java:288) [classes/:?]
at com.atlassian.jira.issue.managers.DefaultIssueDeleteHelper$DeletedIssueEventData.<init>(DefaultIssueDeleteHelper.java:275) [classes/:?]
at com.atlassian.jira.issue.managers.DefaultIssueDeleteHelper.deleteIssue(DefaultIssueDeleteHelper.java:120) [classes/:?]
at com.atlassian.jira.issue.managers.DefaultIssueManager.deleteIssue(DefaultIssueManager.java:719) [classes/:?]
at com.atlassian.jira.issue.managers.RequestCachingIssueManager.deleteIssue(RequestCachingIssueManager.java:232) [classes/:?]
at com.atlassian.jira.bc.issue.DefaultIssueService.delete(DefaultIssueService.java:402) [classes/:?]
at com.atlassian.jira.bc.issue.DefaultIssueService.delete(DefaultIssueService.java:378) [classes/:?]
at com.atlassian.jira.web.action.issue.DeleteIssue.doExecute(DeleteIssue.java:23) 

1 answer

Hi Simdea,

The lines to focus on currently are the following:

Expected exactly 2 rows; the maximum marker row and the lowest ranked row for rank field[id=10005]
com.atlassian.greenhopper.manager.lexorank.LexoRankIntegrityException: Expected exactly 2 rows; the maximum marker row and the lowest ranked row for rank field[id=10005]

Take a look at Several actions such as issue ranking, move, export are failing:

Run the following Query in the DB:

SELECT "FIELD_ID", "ID", "ISSUE_ID", "LOCK_HASH", "LOCK_TIME", "RANK",
       "TYPE"
  FROM "AO_60DB71_LEXORANK"
  WHERE "FIELD_ID" = 10005 AND "TYPE" IN (0, 2);

With the above Query you should see Exactly 2 rows as displayed here:

FIELD_ID | ID |       ISSUE_ID       | LOCK_HASH | LOCK_TIME |   RANK    | TYPE 
----------+----+----------------------+-----------+-----------+-----------+------
    10005 |  7 | -9223372036854775808 |           |           | 0|000000: |    0
    10005 |  8 |  9223372036854775807 |           |           | 0|zzzzzz: |    2
(2 rows)

If the above does hold true in your instance do the following:

  1. Stop JIRA
  2. Run the following statements in the database:

    1. insert into AO_60DB71_LEXORANK values
      (DEFAULT,10005,7,-9223372036854775808,NULL,NULL,'0|000000:',0);
      
      insert into AO_60DB71_LEXORANK values
      (DEFAULT,10005,1,9223372036854775807,NULL,NULL,'0|zzzzzz:',2);
  3. Start JIRA

  4. Re-index JIRA

If that does not work let us know and we'll go from there.

Cheers,

Branden

Hello Branden and thanks for your fast response. Unfortunately, the query returned no results. Any more ideas, I just tried to clone an issue and also did not had any luck.

Best Regards and thank you in advance again,
Simdea

I actually had the same issue as Simdea.   So as Branden suggested I :

1) Stopped Jira service
2) Ran the below statements in the database

insert into AO_60DB71_LEXORANK values(DEFAULT,10005,7,-9223372036854775808,NULL,NULL,'0|000000:',0);

insert into AO_60DB71_LEXORANK values(DEFAULT,10005,1,9223372036854775807,NULL,NULL,'0|zzzzzz:',2);
3) Ran the below statement to validate that the table now had the 2 rows:
select * from AO_60DB71_LEXORANK;
4) Started Jira service
5) Ran an integrity check
6) Re-indexed the database

And the issue was solved.  Thank you Branden.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Apr 22, 2018 in Jira Software

How-to setup a secured Jira Software 7.9.0 on Ubuntu 16.04.4 in less than 30 minutes

...PermissionsStartOnly=true User=www-data Group=www-data ExecStart=/opt/jira/bin/startup.sh ExecStop=/opt/jira/bin/shutdown.sh TimeoutStartSec=120 TimeoutStopSec=600 PrivateTmp=true [Install] WantedBy...

1,749 views 14 13
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you