SzyWilliam commented on code in PR #655:
URL: https://github.com/apache/ratis/pull/655#discussion_r890709845


##########
ratis-server/src/main/java/org/apache/ratis/server/storage/SnapshotManager.java:
##########
@@ -83,9 +83,10 @@ public void installSnapshot(StateMachine stateMachine,
       }
 
       String fileName = chunk.getFilename(); // this is relative to the root 
dir
-      // TODO: assumes flat layout inside SM dir
-      File tmpSnapshotFile = new File(tmpDir,
-          new File(dir.getRoot(), fileName).getName());
+      String fileNameToStateMachineDir = fileName.substring(
+              (dir.STATE_MACHINE_DIR_NAME.length()));

Review Comment:
   It would be great, I'll take this way



-- 
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: [email protected]

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

Reply via email to