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

StandardBenchmarker#makeDocument does not explicitly close opened files

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.2
    • None
    • None
    • Patch Available

    Description

      StandardBenchmarker#makeDocument(File in, String[] tags, boolean stored, boolean tokenized, boolean tfv)

      BufferedReader reader = new BufferedReader(new FileReader(in));

      Above reader is not closed until GC hits it. Can cause problems in cases where ulimit is set too low.

      I did this:

      while ((line = reader.readLine()) != null)

      { body.append(line).append(' '); }

      + reader.close();

      Attachments

        1. LUCENE-829.patch
          3 kB
          Doron Cohen

        Activity

          People

            doronc Doron Cohen
            karl.wettin Karl Wettin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: