zhaih commented on code in PR #12126: URL: https://github.com/apache/lucene/pull/12126#discussion_r1099470288
########## lucene/replicator/src/java/org/apache/lucene/replicator/nrt/CopyJob.java: ########## @@ -206,7 +206,7 @@ private synchronized void _transferAndCancel(CopyJob prevJob) throws IOException if (Node.VERBOSE_FILES) { dest.message("remove partial file " + prevJob.current.tmpName); } - dest.deleter.deleteNewFile(prevJob.current.tmpName); + dest.deleter.deleteIfNoRef(prevJob.current.tmpName); Review Comment: Ah I actually want to do it the opposite way, I'm not 100% sure why we need a `deleteNewFile` (force delete) here rather than `deleteIfNoRef` but I don't want to introduce a (possibly) different behavior in this change so I kept it. Altho the `deleteNewFile` is a bit misleading so I changed the name to `forceDeleteFile` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org