After upgrading 8.10 or above, Jira logs contain 'IncrementDeletedEntityVersionException' and 'Indexing failed for ISSUE' messages
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
From version 8.10, versioning of issues was introduced. Subsequently, DBR has been introduced from version 8.12. This results in the creation of additional tables like issue_version, which are utilized to maintain a version related to an entity, such as an issue, whenever it's updated. These tables will be utilized to ensure that only the latest version of an entity is updated in the index in the Data Center across nodes. When an issue is deleted, the entry in the table for this issue is removed. Whenever we create or update an issue, either through UI or through Rest API, the issue_version table is updated.
Environment
Jira 8.10.0 and later
Diagnosis
When a rest call is made to update an issue that has been since deleted from a plugin, you might see messages similar to below, which might give a red herring indexing failure for issues.
1
2
3
4
5
6
2020-10-21 09:28:28,567-0700 pool-88-thread-4 WARN O804507 273x144x1 xxxx 10.15.134.4,10.15.134.249 /rest/api/2/issue/78676 [c.a.jira.index.AccumulatingResultBuilder] Indexing failed for ISSUE - '78676'
2020-10-21 09:28:28,567-0700 pool-88-thread-4 WARN O804507 273x144x1 xxxx 10.15.134.4,10.15.134.249 /rest/api/2/issue/78676 [c.a.jira.index.AccumulatingResultBuilder] com.atlassian.jira.versioning.IncrementDeletedEntityVersionException: IssueVersion with id 78676 is marked as deleted and its version cannot be incremented.
2020-10-21 09:28:28,567-0700 pool-88-thread-4 ERROR O804507 273x144x1 ctd3ze 10.15.134.4,10.15.134.249 /rest/api/2/issue/78676 [c.m.j.p.emailissue.events.EventProcessorImpl] Indexing completed with 1 errors
....
2020-10-21 09:52:37,802-0700 pool-88-thread-4 INFO I587873 272x135x1 xxxx 10.15.134.4,10.15.134.249 /rest/api/2/issue/78676 [c.a.j.issue.index.DefaultIssueIndexer] The issue with id 78676 could not be indexed as it is marked as deleted. If you see this message rarely, this is just a result of a race condition between updating and deleting an entity. If this is not the case, the deleted flag can be cleaned on the database:
delete from issue_version where issue_id = 781419 and deleted = 'Y';
Cause
The errors though misleading originates from the new changes in the later Jira versions where it tries to update the issue_version table for a deleted issue and fails. This error can be ignored and is not an actual failure for indexing an issue as explained under troubleshoot-a-reindex-failure-in-jira-server . But the plugin that might have tried to index an issue after receiving a DELETE event should be identified. In this case this was an older version of plugin email-this-issue which has since been resolved.
Solution
Identify the scripts with REST api calls or plugins that might be referring to deleted issues and modify them to avoid trying to re-index or update a deleted issue.
Was this helpful?