You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2022/11/08 08:28:35 UTC

[GitHub] [iotdb] xingtanzjr commented on a diff in pull request #7900: [IOTDB-4811]Fix snapshot file name error

xingtanzjr commented on code in PR #7900:
URL: https://github.com/apache/iotdb/pull/7900#discussion_r1016281455


##########
consensus/src/main/java/org/apache/iotdb/consensus/IStateMachine.java:
##########
@@ -69,6 +69,18 @@ default boolean isReadOnly() {
    */
   boolean takeSnapshot(File snapshotDir);
 
+  /**
+   * Take a snapshot of current statemachine. Snapshot.log will be stored under snapshotDir, The
+   * data of the snapshot will be stored under `data folder/snapshot/snapshotId`.
+   *
+   * @param snapshotDir required storage dir
+   * @param snapshotId the id of the snapshot
+   * @return true if snapshot is successfully taken
+   */
+  default boolean takeSnapshot(File snapshotDir, String snapshotId) {

Review Comment:
   remove this default implementation and implement this method in all sub-classes



-- 
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: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org