je-ik commented on a change in pull request #14020:
URL: https://github.com/apache/beam/pull/14020#discussion_r579222332



##########
File path: sdks/java/core/src/main/java/org/apache/beam/sdk/io/Read.java
##########
@@ -537,6 +537,7 @@ public ProcessContinuation processElement(
       while (tracker.tryClaim(out) && out[0] != null) {
         receiver.outputWithTimestamp(
             new ValueWithRecordId<>(out[0].getValue(), out[0].getId()), 
out[0].getTimestamp());
+        
watermarkEstimator.setWatermark(tracker.currentRestriction().getWatermark());

Review comment:
       Hm, actually ... this seems to be a no-op, because the watermark 
estimator used is WatermarkEstimators.Manual, and that simply overwrites the 
set watermark in `lastReportedWatermark`. The watermark is then read only when 
the `processElement` terminates. Therefore, I think we should leave the call to 
`setWatemark` only outside of this while loop.




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


Reply via email to