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

NIOFS and SimpleFSDirectory may leak files if Channel#size() throws an exception

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not A Problem
    • Affects Version/s: 6.0, 6.1
    • Fix Version/s: 6.1.1, 6.2
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      We call Channel#size() inside the NIOFSIndexInput ctor but ignore the fact that it can throw an IOException. I ran into this due to a ClosedByInterrupt exception which we explicitly state don't support. This can also happen due to
      an IOException and we should at least not leak a file handle in such a case.

        Attachments

        1. LUCENE-7349.patch
          5 kB
          Simon Willnauer

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              simonw Simon Willnauer
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: