Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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.

Works well, thanks.

However, if you experience the issue, make sure that you use correct FIELD_ID value which is id of the Rank field. For example on my instance Rank had the id 25700, not 10005.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Software

👋 Looking for 15-20 volunteers to test Atlassian training content

Hi everyone! Are you interested in beta testing Atlassian University’s newest (unreleased!) training course? We’re looking for 15-20 volunteers to test our newest training course, Basic reporting...

611 views 21 25
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you