You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ratis.apache.org by sz...@apache.org on 2023/03/01 01:22:21 UTC
[ratis] 05/16: RATIS-1767. Initialize MatchIndex to RaftLog.INVALID_LOG_INDEX. (#805)
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 <48...@users.noreply.github.com>
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;