Duplicate issue keys during highly concurrent user operations
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
Symptoms
If JIRA as a high number of concurrent users, or a large number of bulk operations, or both on a version of JIRA < 4.4.5, two issues can be created with duplicate keys (e.g. TST-123).
Diagnosis
1
select pkey, count(pkey) from jiraissue group by pkey having count(pkey)>1;
Returns a list of issue keys.
Cause
The Index operations are out-of-sync with the DB transactions, which happens under extremely high (concurrent) load such as multiple simultaneous bulk operations.
Solution
Resolution
Upgrade your instance to JIRA 4.4.5 or higher versions
Workaround
Always back up your data before making any database modifications. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.
Shut down JIRA
UPDATE
the database rows that have duplicate keys with new values (Max value in DB + 1).Run the following against the database to prevent future duplicates:
1
alter table jiraissue add constraint pkey_constraint_check unique (pkey);
Start JIRA back up and reindex the instance.
Was this helpful?