You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ratis.apache.org by sz...@apache.org on 2023/02/21 20:02:54 UTC
[ratis] branch master updated: RATIS-1786. Reset the digester of the follower at the beginning of each file transfer during a InstallSnapshot to avoid snapshot transfer failure (#825)
This is an automated email from the ASF dual-hosted git repository.
szetszwo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ratis.git
The following commit(s) were added to refs/heads/master by this push:
new 4ba1e71a3 RATIS-1786. Reset the digester of the follower at the beginning of each file transfer during a InstallSnapshot to avoid snapshot transfer failure (#825)
4ba1e71a3 is described below
commit 4ba1e71a3a0c0110421c459d7c2d116c0bed10ea
Author: Potato <ta...@apache.org>
AuthorDate: Wed Feb 22 04:02:47 2023 +0800
RATIS-1786. Reset the digester of the follower at the beginning of each file transfer during a InstallSnapshot to avoid snapshot transfer failure (#825)
---
.../src/main/java/org/apache/ratis/server/storage/SnapshotManager.java | 1 +
1 file changed, 1 insertion(+)
diff --git a/ratis-server/src/main/java/org/apache/ratis/server/storage/SnapshotManager.java b/ratis-server/src/main/java/org/apache/ratis/server/storage/SnapshotManager.java
index 1e2f70a68..ab276bdcf 100644
--- a/ratis-server/src/main/java/org/apache/ratis/server/storage/SnapshotManager.java
+++ b/ratis-server/src/main/java/org/apache/ratis/server/storage/SnapshotManager.java
@@ -113,6 +113,7 @@ public class SnapshotManager {
}
// create the temp snapshot file and put padding inside
out = new FileOutputStream(tmpSnapshotFile);
+ digester.get().reset();
} else {
Preconditions.assertTrue(tmpSnapshotFile.exists());
out = new FileOutputStream(tmpSnapshotFile, true);