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


##########
core/src/main/scala/kafka/coordinator/group/CoordinatorLoaderImpl.scala:
##########
@@ -148,6 +156,16 @@ class CoordinatorLoaderImpl[T](
                 }
               }
 
+              val currentHighWatermark = log.highWatermark
+              if (currentHighWatermark > previousHighWatermark) {
+                onHighWatermarkUpdated.accept(currentHighWatermark)
+                previousHighWatermark = currentHighWatermark
+              }
+
+              if (currentOffset >= currentHighWatermark) {
+                onLoadedBatch.accept(currentOffset)
+              }

Review Comment:
   currentOffset points to the nextOffset (the last offset in the batch plus 1) 
so I had this after successfully loading for an offset. Should 
lastWrittenOffset point to the next offset?



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