jeffkbkim commented on code in PR #12783:
URL: https://github.com/apache/kafka/pull/12783#discussion_r1013413433


##########
core/src/main/scala/kafka/server/ReplicaFetcherThread.scala:
##########
@@ -132,9 +139,22 @@ class ReplicaFetcherThread(name: String,
 
     brokerTopicStats.updateReplicationBytesIn(records.sizeInBytes)
 
+    val highWatermarkChanged = 
log.maybeUpdateHighWatermark(partitionData.highWatermark)
+    if (highWatermarkChanged) {
+      logAppendInfo.foreach { _ => partitionsWithNewHighWatermark += 
topicPartition }
+      if (logTrace)
+        trace(s"Follower updated replica high watermark for partition 
$topicPartition to ${partitionData.highWatermark}")

Review Comment:
   much more elegant. thanks for the suggestion!



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

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to