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

Lucene60PointsWriter has a buggy close method

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 6.0
    • None
    • None
    • New

    Description

      This will leak a file handle on e.g. disk full or other exceptions

        @Override
        public void close() throws IOException {
          if (closed == false) {
            CodecUtil.writeFooter(dataOut); // something bad happens
            dataOut.close();
      

      I'm not a fan of these complex close methods, should we add a finish() to the codec api or similar?

      Attachments

        1. LUCENE-6999_test.patch
          9 kB
          Robert Muir
        2. LUCENE-6999.patch
          15 kB
          Michael McCandless

        Activity

          People

            mikemccand Michael McCandless
            rcmuir Robert Muir
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: