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 07:52:19 UTC

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

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



##########
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:
       Because this function does not access any class member. Any suggestion or style guide that says better to not use static?




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