neuyilan commented on a change in pull request #2987:
URL: https://github.com/apache/iotdb/pull/2987#discussion_r611155769
##########
File path:
cluster/src/main/java/org/apache/iotdb/cluster/server/member/RaftMember.java
##########
@@ -439,6 +417,31 @@ public HeartBeatResponse
processHeartbeatRequest(HeartBeatRequest request) {
}
}
+ private void tryUpdateCommitIndex(long leaderTerm, long commitIndex, long
commitTerm) {
+ if (term.get() == leaderTerm && logManager.getCommitLogIndex() <
commitIndex) {
Review comment:
```suggestion
if (leaderTerm >= term.get() && logManager.getCommitLogIndex() <
commitIndex) {
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]