sjvanrossum commented on code in PR #39285:
URL: https://github.com/apache/beam/pull/39285#discussion_r3567116632


##########
sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/ReadFromKafkaDoFn.java:
##########
@@ -687,7 +634,7 @@ public ProcessContinuation processElement(
 
         final long estimatedBacklogBytes =
             (long)
-                (BigDecimal.valueOf(latestOffsetEstimator.estimate())
+                (BigDecimal.valueOf(latestOffsetEstimator.get())
                         .subtract(BigDecimal.valueOf(expectedOffset), 
MathContext.DECIMAL128)
                         .doubleValue()
                     * avgRecordSize.get());

Review Comment:
   This seems fair, but should apply whenever the estimate is behind the 
expected offset.
   Addressed in 9ffbc88.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to