This is an automated email from the ASF dual-hosted git repository. szetszwo pushed a commit to branch branch-2_tmp in repository https://gitbox.apache.org/repos/asf/ratis.git
commit e47fcb96217e6e2b44fa1c36e8b4106de9f0d490 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) (cherry picked from commit 4ba1e71a3a0c0110421c459d7c2d116c0bed10ea) --- .../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 294f0a205..1ea7363fb 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 @@ -115,6 +115,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);
