[TR-192] On Windows, the document.fsarrayfile is not closed, resulting in a _1 in the filename when indexing Created: 29/Feb/12  Updated: 31/Mar/14  Resolved: 31/Mar/14

Status: Resolved
Project: Terrier Core
Component/s: .structures
Affects Version/s: 3.5
Fix Version/s: 3.6

Type: Bug Priority: Major
Reporter: Richard McCreadie Assignee: Craig Macdonald
Resolution: Fixed  
Labels: None


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

Moved here to look at for 3.7/4.0.



 Comments   
Comment by Craig Macdonald [ 26/Jul/12 ]

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.

Comment by Richard McCreadie [ 31/Mar/14 ]

Bug confirmed on Windows 7 32bit with current build.

Error thrown at IndexUtil.renameIndex() line 270.

Comment by Craig Macdonald [ 31/Mar/14 ]

I have a DebuggingFileSystem somewhere that might be useful.

Comment by Richard McCreadie [ 31/Mar/14 ]

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

Comment by Richard McCreadie [ 31/Mar/14 ]

Committed 3763.

Comment by Craig Macdonald [ 31/Mar/14 ]

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

Comment by Richard McCreadie [ 31/Mar/14 ]

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

Comment by Richard McCreadie [ 31/Mar/14 ]

All unit tests pass, closing issue.

Comment by Richard McCreadie [ 31/Mar/14 ]

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

Generated at Thu Dec 14 10:21:06 GMT 2017 using JIRA 7.1.1#71004-sha1:d6b2c0d9b7051e9fb5e4eb8ce177ca56d91d7bd8.