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

Lucene60PointsWriter has a buggy close method

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      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.patch
          15 kB
          Michael McCandless
        2. LUCENE-6999_test.patch
          9 kB
          Robert Muir

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: