You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2020/10/12 23:08:41 UTC

[GitHub] [kafka] hachikuji commented on a change in pull request #9352: KAFKA-10533; KafkaRaftClient should flush log after appends

hachikuji commented on a change in pull request #9352:
URL: https://github.com/apache/kafka/pull/9352#discussion_r503578114



##########
File path: raft/src/main/java/org/apache/kafka/raft/KafkaRaftClient.java
##########
@@ -193,8 +193,9 @@ private void updateFollowerHighWatermark(
     ) {
         highWatermarkOpt.ifPresent(highWatermark -> {
             long newHighWatermark = Math.min(endOffset().offset, highWatermark);
-            state.updateHighWatermark(OptionalLong.of(newHighWatermark));
-            updateHighWatermark(state, currentTimeMs);
+            if (state.updateHighWatermark(OptionalLong.of(newHighWatermark))) {

Review comment:
       Yeah, right. Also to avoid the log spam when the high watermark doesn't actually increment.




----------------------------------------------------------------
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