[ https://issues.apache.org/jira/browse/LUCENE-5351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13853235#comment-13853235 ]
Simon Willnauer commented on LUCENE-5351: ----------------------------------------- LUCENE-5368 kind of convinced me that we need to harden the Dir contract maybe with documention but I still think the exception here is dangerous and bad? Not sure but I think the Directory contract shoudl be fixed > DirectoryReader#close can throw AlreadyClosedException if it's and NRT reader > ----------------------------------------------------------------------------- > > Key: LUCENE-5351 > URL: https://issues.apache.org/jira/browse/LUCENE-5351 > Project: Lucene - Core > Issue Type: Bug > Components: core/index > Affects Versions: 4.6 > Reporter: Simon Willnauer > Assignee: Simon Willnauer > Fix For: 5.0, 4.7 > > Attachments: LUCENE-5351.patch > > > in StandartDirectoryReader#doClose we do this: > {noformat} > if (writer != null) { > // Since we just closed, writer may now be able to > // delete unused files: > writer.deletePendingFiles(); > } > {noformat} > which can throw AlreadyClosedException from the directory if the Direcotory > has already closed. To me this looks like a bug and we should catch this > exception from the directory. -- This message was sent by Atlassian JIRA (v6.1.4#6159) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org