runzhiwang commented on a change in pull request #168:
URL: https://github.com/apache/incubator-ratis/pull/168#discussion_r465549811
##########
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:
I think it should be a common util, and should not placed here.
----------------------------------------------------------------
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]