You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2021/04/11 09:02:09 UTC
[GitHub] [iotdb] neuyilan commented on a change in pull request #2987: optimize sync leader for meta
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:
users@infra.apache.org