[
https://issues.apache.org/jira/browse/SOLR-11892?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16338695#comment-16338695
]
Robert Muir commented on SOLR-11892:
------------------------------------
The leniency there only exists for windows systems / CIFS mounts of windows
shares: which may not allow this and require retries. It is explained both in
the code comments and the oracle JDK documentation for Files.delete. I don't
think there is anything to figure out, except perhaps "drop windows / CIFS
mount support".
It is also important to understand what deleteIfExists really does, it simply
does nothing but catch an exception and return a boolean:
http://hg.openjdk.java.net/jdk/jdk/file/b742e0f9ce80/src/java.base/share/classes/java/nio/file/spi/FileSystemProvider.java#l737
But sorry, deleting files is nobody's hotspot in lucene, its not the place to
add any "optimizations". As far as creating exceptions statically, this is 100%
bogus and will make debugging impossible. I an completely against it for any
lucene code.
> Avoid unnecessary exceptions in FSDirectory and RAMDirectory
> ------------------------------------------------------------
>
> Key: SOLR-11892
> URL: https://issues.apache.org/jira/browse/SOLR-11892
> Project: Solr
> Issue Type: Improvement
> Security Level: Public(Default Security Level. Issues are Public)
> Reporter: Erick Erickson
> Assignee: Erick Erickson
> Priority: Minor
>
> In privateDeleteFile, just use deleteIfExists.
> in RamDirectory we can declare a static exception and create it once.
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]