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 3e1419c72ad10d6c14385a3daf2f1f25ea8bcdc7
Author: William Song <[email protected]>
AuthorDate: Tue Jan 10 14:45:05 2023 +0800

    RATIS-1767. Initialize MatchIndex to RaftLog.INVALID_LOG_INDEX. (#805)
    
    (cherry picked from commit c62c9e22557bb55173f0668fd196ee51fb1f73be)
---
 .../src/main/java/org/apache/ratis/server/impl/FollowerInfoImpl.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/ratis-server/src/main/java/org/apache/ratis/server/impl/FollowerInfoImpl.java 
b/ratis-server/src/main/java/org/apache/ratis/server/impl/FollowerInfoImpl.java
index 81dbe29c6..0d7fe2075 100644
--- 
a/ratis-server/src/main/java/org/apache/ratis/server/impl/FollowerInfoImpl.java
+++ 
b/ratis-server/src/main/java/org/apache/ratis/server/impl/FollowerInfoImpl.java
@@ -37,7 +37,7 @@ class FollowerInfoImpl implements FollowerInfo {
   private final AtomicReference<Timestamp> lastRpcSendTime;
   private final AtomicReference<Timestamp> lastHeartbeatSendTime;
   private final RaftLogIndex nextIndex;
-  private final RaftLogIndex matchIndex = new RaftLogIndex("matchIndex", 0L);
+  private final RaftLogIndex matchIndex = new RaftLogIndex("matchIndex", 
RaftLog.INVALID_LOG_INDEX);
   private final RaftLogIndex commitIndex = new RaftLogIndex("commitIndex", 
RaftLog.INVALID_LOG_INDEX);
   private final RaftLogIndex snapshotIndex = new RaftLogIndex("snapshotIndex", 
0L);
   private volatile boolean attendVote;

Reply via email to