-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
7.11.0, 7.2.15, 7.6.7, 7.12.0
-
7.02
-
2
-
Severity 3 - Minor
-
1
-
Summary
The way Jira cleans up some of it's request caches can lead to memory leaks for code executed outside of HTTP threads - caesium jobs or plugin-supplied long running threads.
Details
It applies to all request-scope caches provided by JiraAuthenticationContextImpl (AuthenticationContextImpl) and managed by JiraThreadLocalUtils.
Jira API provides plugin vendors with a way to execute code outside of HTTP requests scope with OffRequestThreadExecutor
It's supposed to properly initiate and destroy request caches.
JiraAuthenticationContextImpl.clearRequestCache(); is called on preCall, but not on postCall
Because of that request caches will not be cleaned up until the consecutive run of the job on the same java thread.
Expected results
Request caches are being cleaned properly after a plugin-supplied code is executed.
Actual results
Request caches are not cleaned and accumulate lots of unneeded objects in memory.
Workaround
Calling JiraAuthenticationContextImpl.clearRequestCache(); would ensure that a job is not leaving anything behind.
- is related to
-
JRASERVER-67502 RequestCachingGroupManager may accumulate too many objects in RequestCache during processing large user sets
- Closed
-
JRASERVER-67202 Documentation: Plugin should call clearRequestCache for JiraAuthenticationContextImpl after execution
- Gathering Interest
- causes
-
GRD-466 Loading...