Stuck Assets Re-index Caused by Duplicate Attribute Values Removal
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
After upgrading to 5.12+ and 5.16+, the Assets re-index might be stuck at a different percentage or very slow.
Solution
Log files to investigate stuck re-index
Asset indexing does not complete and halts at different percentages.
Log files show warnings about duplicate object attributes:
1
2024-12-06 16:11:42,946+0100 insight-InsightThreadGroup-worker-thread-1 WARN Anonymous user [c.r.j.p.i.s.c.d.dao.sql.AbstractAOService] Found duplicate object attributes for object with id 1906545
Threads appear stuck while trying to resolve duplicate attribute values:
1 2 3 4
06-Dec-2024 16:45:16.006 WARNING [Catalina-utility-1] org.apache.catalina.valves.StuckThreadDetectionValve.notifyStuckThreadDetected Thread [https-jsse-nio-8443-exec-9...] has been active for [123,549] milliseconds and may be stuck (configured threshold for this StuckThreadDetectionValve is [120] seconds). There is/are [2] thread(s) in total that are monitored by this Valve and may be stuck. java.lang.Throwable at com.riadalabs.jira.plugins.insight.services.core.dal.impl.ObjectDalImpl.findDuplicateObjectAttributeValueIds(ObjectDalImpl.java:524) at com.riadalabs.jira.plugins.insight.services.core.dal.impl.ObjectDalImpl.removeDuplicates(ObjectDalImpl.java:464)
Known bug in Jira 5.12+ and 5.16+
This issue is related to a bug identified in Jira 5.12+, 5.16+, referenced as: JSDSERVER-15551 - Changing Cardinality in Assets may lead to undocumented data removal from the database
The bug causes Assets to attempt removing non-existent duplicate attributes during re-indexing, resulting in blocked threads.
To fix the issue, it's necessary to upgrade Jira Service Management to v.10.2.0+.
As a workaround, you can add the following Dark Feature to disable duplicates handling during reindexing:
1
assets.index.dedupe.attributes.disabled
Enabling this feature flag might result in duplicate attribute values after imports in the future.
Was this helpful?