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 ebeab9344 RATIS-2136 Fixed the issue that RatisServer could not start 
after frequent restarts (#1131)
ebeab9344 is described below

commit ebeab934472c42da5344729f35a7758baa596a13
Author: Potato <[email protected]>
AuthorDate: Sat Aug 10 00:13:59 2024 +0800

    RATIS-2136 Fixed the issue that RatisServer could not start after frequent 
restarts (#1131)
---
 .../src/main/java/org/apache/ratis/server/raftlog/RaftLogBase.java      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/ratis-server/src/main/java/org/apache/ratis/server/raftlog/RaftLogBase.java 
b/ratis-server/src/main/java/org/apache/ratis/server/raftlog/RaftLogBase.java
index ba5dff2aa..c92c04c43 100644
--- 
a/ratis-server/src/main/java/org/apache/ratis/server/raftlog/RaftLogBase.java
+++ 
b/ratis-server/src/main/java/org/apache/ratis/server/raftlog/RaftLogBase.java
@@ -276,7 +276,7 @@ public abstract class RaftLogBase implements RaftLog {
 
     final long startIndex = getStartIndex();
     if (startIndex > LEAST_VALID_LOG_INDEX) {
-      purgeIndex.updateIncreasingly(startIndex - 1, infoIndexChange);
+      purgeIndex.updateToMax(startIndex - 1, infoIndexChange);
     }
   }
 

Reply via email to