This is an automated email from the ASF dual-hosted git repository. williamsong pushed a commit to branch snapshot-branch2 in repository https://gitbox.apache.org/repos/asf/ratis.git
commit 7ab0c2ca1f701c00f4682aed2368d9695be30dbd Author: William Song <[email protected]> AuthorDate: Tue Jan 10 14:45:05 2023 +0800 RATIS-1767. Initialize MatchIndex to RaftLog.INVALID_LOG_INDEX. (#805) --- .../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;
