Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-2283

Possible Memory Leak in StoredFieldsWriter

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.1
    • Fix Version/s: 2.9.3, 3.0.2, 3.1, 4.0-ALPHA
    • Component/s: core/index
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      StoredFieldsWriter creates a pool of PerDoc instances

      this pool will grow but never be reclaimed by any mechanism

      furthermore, each PerDoc instance contains a RAMFile.
      this RAMFile will also never be truncated (and will only ever grow) (as far as i can tell)

      When feeding documents with large number of stored fields (or one large dominating stored field) this can result in memory being consumed in the RAMFile but never reclaimed. Eventually, each pooled PerDoc could grow very large, even if large documents are rare.

      Seems like there should be some attempt to reclaim memory from the PerDoc[] instance pool (or otherwise limit the size of RAMFiles that are cached) etc

        Attachments

        1. LUCENE-2283.patch
          12 kB
          Tim Smith
        2. LUCENE-2283.patch
          13 kB
          Tim Smith
        3. LUCENE-2283.patch
          13 kB
          Michael McCandless

          Activity

            People

            • Assignee:
              mikemccand Michael McCandless
              Reporter:
              tsmith Tim Smith
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: