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

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

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 6.0, 6.1
    • 6.1.1, 6.2
    • None
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: