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/01/10 06:45:10 UTC
[ratis] branch master updated: 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 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 c62c9e225 RATIS-1767. Initialize MatchIndex to RaftLog.INVALID_LOG_INDEX. (#805)
c62c9e225 is described below
commit c62c9e22557bb55173f0668fd196ee51fb1f73be
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)
---
.../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;