You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ja...@apache.org on 2022/07/20 06:13:09 UTC

[iotdb] branch master updated: exclude md5 file when get latest snapshot (#6704)

This is an automated email from the ASF dual-hosted git repository.

jackietien pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/master by this push:
     new 58048ecfa6 exclude md5 file when get latest snapshot (#6704)
58048ecfa6 is described below

commit 58048ecfa6f378a75e61479b90670d5f779671ba
Author: William Song <48...@users.noreply.github.com>
AuthorDate: Wed Jul 20 14:13:05 2022 +0800

    exclude md5 file when get latest snapshot (#6704)
---
 .../main/java/org/apache/iotdb/consensus/ratis/SnapshotStorage.java    | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/consensus/src/main/java/org/apache/iotdb/consensus/ratis/SnapshotStorage.java b/consensus/src/main/java/org/apache/iotdb/consensus/ratis/SnapshotStorage.java
index bf70919ff8..ecbc4ae628 100644
--- a/consensus/src/main/java/org/apache/iotdb/consensus/ratis/SnapshotStorage.java
+++ b/consensus/src/main/java/org/apache/iotdb/consensus/ratis/SnapshotStorage.java
@@ -143,6 +143,9 @@ public class SnapshotStorage implements StateMachineStorage {
 
     List<FileInfo> fileInfos = new ArrayList<>();
     for (Path file : getAllFilesUnder(latestSnapshotDir)) {
+      if (file.endsWith(".md5")) {
+        continue;
+      }
       FileInfo fileInfo = new FileInfoWithDelayedMd5Computing(file);
       fileInfos.add(fileInfo);
     }