mjsax commented on a change in pull request #8776:
URL: https://github.com/apache/kafka/pull/8776#discussion_r435589707



##########
File path: 
streams/src/main/java/org/apache/kafka/streams/processor/internals/TaskManager.java
##########
@@ -613,10 +604,14 @@ private long sumOfChangelogOffsets(final TaskId id, final 
Map<TopicPartition, Lo
         for (final Map.Entry<TopicPartition, Long> changelogEntry : 
changelogOffsets.entrySet()) {
             final long offset = changelogEntry.getValue();
 
-            offsetSum += offset;
-            if (offsetSum < 0) {
-                log.warn("Sum of changelog offsets for task {} overflowed, 
pinning to Long.MAX_VALUE", id);
-                return Long.MAX_VALUE;
+            if (offset == Task.LATEST_OFFSET) {
+                return Task.LATEST_OFFSET;
+            } else {
+                offsetSum += offset;

Review comment:
       Ack




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to