Details
-
Bug
-
Resolution: Fixed
-
Medium
-
3.8
-
None
-
3.08
-
Description
The DocumentSortComparatorSource leaks instance of the indexReader into the comparator created causing memory leak. The FieldSortedHitQueue maintains a weak hashmap of indexReader -> Comparator mappings. In the case of the DocumentSortcomparator, the indexReader itself is referenced by the comparator, and the weakHashmap therefore can never release all the mappings held onto by that indexReader. Over time this results in a memory leak.
It looks like only the 'Last time commented' custom field from the JIRA Toolkit uses this comparator currently. The problem only occurs if the issue navigator is sorted by this field. It is therefore quite rare for this to occur and should be treated as a fairly low priority bug.