Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-12665

CustomFields using the DocumentSortComparatorSource may cause a memory leak when sorting

    XMLWordPrintable

Details

    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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            andreask@atlassian.com Andreas Knecht (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: