amaliujia commented on a change in pull request #168:
URL: https://github.com/apache/incubator-ratis/pull/168#discussion_r465859007



##########
File path: 
ratis-server/src/main/java/org/apache/ratis/server/storage/SnapshotManager.java
##########
@@ -131,4 +133,12 @@ public void installSnapshot(StateMachine stateMachine,
       tmpDir.renameTo(dir.getStateMachineDir());
     }
   }
+
+  // Rename a file by appending .corrupt to file name. This function does not 
guarantee
+  // that the rename operation is successful.
+  @VisibleForTesting
+  static void renameFileToCorrupt(File tmpSnapshotFile) {

Review comment:
       Thanks for your reminder.
   
   I didn't find such function implemented in common util, but indeed I found 
something useful so I pushed to adopt those. I also moved the rename-to-corrupt 
to FileUtils.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to