[ https://issues.apache.org/jira/browse/SOLR-11892?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16338678#comment-16338678 ]
Erick Erickson commented on SOLR-11892: --------------------------------------- I was not suggesting the code snippet as a proposal, rather I was making a comment that using deleteIfExists doesn't help at all since it just conceals the same exception from the profiler. So there's no reason to even consider changing the code in privateDelete. Did you see this next part? "Another take is that the effort would be better spent understanding why we try to delete files that don't exist in the first place and fix _that_."? If "deleting files is scary", it seems that trying to delete files that don't exist is also scary and why the attempt is even being made should be investigated. _Then_ we can decide what the proper fix should be, if any. > 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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org