Skip to content

Commit 4c48bfc

Browse files
committed
remove unnecessary update
1 parent ae588d0 commit 4c48bfc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

raft/src/main/java/org/apache/kafka/raft/LeaderState.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ protected LeaderState(
163163
ReplicaState state = new ReplicaState(voterNode.voterKey(), hasAcknowledgedLeader, voterNode.listeners());
164164
this.voterStates.put(voterNode.voterKey().id(), state);
165165
if (isInitializing) {
166+
log.debug("put " + state + " into CommittedVoterStates");
166167
this.committedVoterStates.put(voterNode.voterKey().id(), state);
167168
}
168169
}
@@ -720,7 +721,6 @@ private boolean maybeUpdateHighWatermark() {
720721

721722
int indexOfHw = voterStates.size() / 2;
722723
Optional<LogOffsetMetadata> highWatermarkUpdateOpt = followersByDescendingFetchOffset.get(indexOfHw).endOffset;
723-
highWatermark.ifPresent(this::updateCommittedVoter);
724724

725725
if (highWatermarkUpdateOpt.isPresent()) {
726726

0 commit comments

Comments
 (0)