Uploaded image for project: 'Terrier Core'
  1. Terrier Core
  2. TR-192

On Windows, the document.fsarrayfile is not closed, resulting in a _1 in the filename when indexing

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.5
    • Fix Version/s: 3.6
    • Component/s: .structures
    • Labels:
      None

      Description

      See: http://terrier.org/forum//read.php?3,1960

      Moved here to look at for 3.7/4.0.

        Attachments

          Activity

          Hide
          craigm Craig Macdonald added a comment -

          I committed many fixes for various files being left open, under TR-192 at revision r3645, but I haven't found one that causes the document index to remain open.

          Show
          craigm Craig Macdonald added a comment - I committed many fixes for various files being left open, under TR-192 at revision r3645, but I haven't found one that causes the document index to remain open.
          Hide
          richardm Richard McCreadie added a comment -

          Bug confirmed on Windows 7 32bit with current build.

          Error thrown at IndexUtil.renameIndex() line 270.

          Show
          richardm Richard McCreadie added a comment - Bug confirmed on Windows 7 32bit with current build. Error thrown at IndexUtil.renameIndex() line 270.
          Hide
          craigm Craig Macdonald added a comment -

          I have a DebuggingFileSystem somewhere that might be useful.

          Show
          craigm Craig Macdonald added a comment - I have a DebuggingFileSystem somewhere that might be useful.
          Hide
          richardm Richard McCreadie added a comment - - edited

          Bug found. BitPostingIndexInputStream does not close the document index. Adding IndexUtil.close(doi); in the BitPostingIndexInputStream.close() method fixes the issue.

          Show
          richardm Richard McCreadie added a comment - - edited Bug found. BitPostingIndexInputStream does not close the document index. Adding IndexUtil.close(doi); in the BitPostingIndexInputStream.close() method fixes the issue.
          Hide
          richardm Richard McCreadie added a comment -

          Committed 3763.

          Show
          richardm Richard McCreadie added a comment - Committed 3763.
          Hide
          craigm Craig Macdonald added a comment -

          Should the closing not be in the indexer, rather than BitPostingIndexInputStream?

          Show
          craigm Craig Macdonald added a comment - Should the closing not be in the indexer, rather than BitPostingIndexInputStream?
          Hide
          richardm Richard McCreadie added a comment -

          The constructor of BitPostingIndexInputStream calls this.doi = _index.getDocumentIndex(); So it makes sense that BitPostingIndexInputStream.close() should close it.

          Show
          richardm Richard McCreadie added a comment - The constructor of BitPostingIndexInputStream calls this.doi = _index.getDocumentIndex(); So it makes sense that BitPostingIndexInputStream.close() should close it.
          Hide
          richardm Richard McCreadie added a comment -

          All unit tests pass, closing issue.

          Show
          richardm Richard McCreadie added a comment - All unit tests pass, closing issue.
          Hide
          richardm Richard McCreadie added a comment -

          Moved close to Inverted index builder. InvertedIndexBuilder now closes all structures.

          Show
          richardm Richard McCreadie added a comment - Moved close to Inverted index builder. InvertedIndexBuilder now closes all structures.

            People

            • Assignee:
              craigm Craig Macdonald
              Reporter:
              richardm Richard McCreadie
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: