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

Reply via email to