You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ratis.apache.org by GitBox <gi...@apache.org> on 2020/08/05 08:08:45 UTC

[GitHub] [incubator-ratis] runzhiwang commented on a change in pull request #168: RATIS-1023.During installing snapshot, when snapshot file is corrup…

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:
users@infra.apache.org