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

Queries that reference a TermContext can cause a memory leak when they are cached

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 5.5.4, 6.4.1, 6.5, 7.0
    • None
    • None
    • New

    Description

      The TermContext class has a reference to the top reader context of the IndexReader that was used to build it. So if you build a (Span)TermQuery that references a TermContext and this query gets cached, then it will keep holding a reference to the index reader, even after the latter gets closed.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            jpountz Adrien Grand
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment