You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "jimmykobe1171 (via GitHub)" <gi...@apache.org> on 2023/02/06 23:30:22 UTC

[GitHub] [lucene] jimmykobe1171 commented on a diff in pull request #12126: Refactor part of IndexFileDeleter and ReplicaFileDeleter into a common utility class

jimmykobe1171 commented on code in PR #12126:
URL: https://github.com/apache/lucene/pull/12126#discussion_r1098024345


##########
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:
   Seems like **deleteIfNoRef** is always safer than **deleteNewFile**. Do we still need the method deleteNewFile?



-- 
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-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org