-
Bug
-
Resolution: Fixed
-
Highest
-
7.9.2, 8.2.0, 7.6.14, 7.13.4, 7.13.9, 8.5.1, 8.13.17, 8.20.5, 8.20.6
-
7.06
-
84
-
Severity 2 - Major
-
255
-
Summary
In JRASERVER-68806 we decreased the size of the EagerLoadingOfBizCustomFieldPersister cache from infinite to 10. This works well for operations such as CSV export and indexing, which access each issue only once. However, there are some bulk operations that iterate over the same issues multiple times. So far we have identified these:
- bulk issue move
- changing project issue type scheme (requires issue type mapping) (70 mins for 21k issues)
In these cases, the cache that holds values for the last 10 issues is constantly being reloaded, which makes it practically as there is no cache (see notes below).
Steps to Reproduce
- <TBD>
Expected Results
- Bulk issue operations are fast
- DB is not overloaded with requests
Actual Results
- bulk issue operations are slow
- Large number of SQL operations querying customfieldvalue table:
SELECT ID, ISSUE, CUSTOMFIELD, UPDATED, PARENTKEY, STRINGVALUE, NUMBERVALUE, TEXTVALUE, DATEVALUE, VALUETYPE FROM customfieldvalue WHERE ISSUE='<ID>'
Notes
Example of thread doing BulkMigrateOperation, merged by operations, you can see that cache constantly being reloaded:
"https-jsse-nio-8443-exec-6 url:/secure/admin/M...chooseContext.jspa username:user1" count=11 prio=5 tid=0x00007f18a9bc8800 nid=0xa70b runnable [0x00007f1739d67000] java.lang.Thread.State: RUNNABLE100.00% [11/11]\ at com.atlassian.jira.web.action.admin.issuetypes.MigrateIssueTypes.doChooseContext(MigrateIssueTypes.java:81) 100.00% [11/11] \ at com.atlassian.jira.bulkedit.operation.BulkMigrateOperation.chooseContextNoValidate(BulkMigrateOperation.java:248) 100.00% [11/11] \ at com.atlassian.jira.bulkedit.operation.BulkMoveOperationImpl.chooseContextNoValidate(BulkMoveOperationImpl.java:333) 100.00% [11/11] \ at com.atlassian.jira.bulkedit.operation.BulkMoveOperationImpl.finishChooseContext(BulkMoveOperationImpl.java:482) 100.00% [11/11] \ at com.atlassian.jira.bulkedit.operation.BulkMoveOperationImpl.setMoveFieldLayoutItems(BulkMoveOperationImpl.java:919) 100.00% [11/11] X at com.atlassian.jira.bulkedit.operation.BulkMoveOperationImpl.fieldNeedsMove(BulkMoveOperationImpl.java:958) 9.09% [1/11] |\ at com.atlassian.jira.web.bean.BulkEditBeanImpl.getFirstTargetIssueObject(BulkEditBeanImpl.java:685) 9.09% [1/11] | \ at com.atlassian.jira.web.bean.BulkEditBeanImpl.getTargetIssueObjects(BulkEditBeanImpl.java:697) .... 90.91% [10/11] \ at com.atlassian.jira.bulkedit.operation.BulkMoveOperationImpl.fieldNeedsMove(BulkMoveOperationImpl.java:989) 90.91% [10/11] \ at com.atlassian.jira.issue.fields.ImmutableCustomField.needsMove(ImmutableCustomField.java:1058) 90.91% [10/11] \ at com.atlassian.jira.issue.fields.ImmutableCustomField.doesFieldHaveValue(ImmutableCustomField.java:1179) 90.91% [10/11] \ at com.atlassian.jira.issue.fields.ImmutableCustomField.getValue(ImmutableCustomField.java:350) 90.91% [10/11] \ at com.atlassian.jira.issue.customfields.impl.AbstractSingleFieldType.getValueFromIssue(AbstractSingleFieldType.java:73) 90.91% [10/11] \ at com.atlassian.jira.issue.customfields.impl.AbstractSingleFieldType.getValueFromIssue(AbstractSingleFieldType.java:87) 90.91% [10/11] \ at com.atlassian.jira.issue.customfields.persistence.OfBizCustomFieldValuePersister.getValues(OfBizCustomFieldValuePersister.java:65) 90.91% [10/11] \ at com.atlassian.jira.issue.customfields.persistence.OfBizCustomFieldValuePersister.getValues(OfBizCustomFieldValuePersister.java:73) 90.91% [10/11] \ at com.atlassian.jira.issue.customfields.persistence.EagerLoadingOfBizCustomFieldPersister.getValuesForTypeAndParent(EagerLoadingOfBizCustomFieldPersister.java:86) 90.91% [10/11] \ at com.atlassian.jira.issue.customfields.persistence.EagerLoadingOfBizCustomFieldPersister.getValuesForIssueId(EagerLoadingOfBizCustomFieldPersister.java:103) 90.91% [10/11] \ at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4739) .... 90.91% [10/11] X at org.ofbiz.core.entity.GenericHelperDAO.findByAnd(GenericHelperDAO.java:166) 45.45% [5/11] \ at oracle.jdbc.driver.InsensitiveScrollableResultSet.next(InsensitiveScrollableResultSet.java:406)
Workaround
- Increase the cache size (jira.customfield.values.cache.max.size) to hold required number of issues (default 10). This is done by introducing the following JVM startup argument, for example, to increase the cache size to 1000:
-Djira.customfield.values.cache.max.size=1000
- is a regression of
-
JRASERVER-68806 Custom Field Value cache can grow indefinitely
- Closed
- is caused by
-
JRASERVER-68806 Custom Field Value cache can grow indefinitely
- Closed
- relates to
-
JRACLOUD-75870 Bulk Move/Edit issues with high number of custom fields can timeout on validations
- Closed
-
JRASERVER-71820 projectAndUserToSecurityLevelCache can cause OOM due to large number of elements
- Closed
-
JRASERVER-70465 Increase the default cache size for customfield.values cache
- Gathering Interest
- Mentioned in
- mentioned in
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...