Abacn commented on code in PR #22962:
URL: https://github.com/apache/beam/pull/22962#discussion_r960957448
##########
sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/ReadFromKafkaDoFn.java:
##########
@@ -343,6 +343,9 @@ public ProcessContinuation processElement(
// Stop processing current TopicPartition when it's time to stop.
if (checkStopReadingFn != null
&&
checkStopReadingFn.apply(kafkaSourceDescriptor.getTopicPartition())) {
+ // Attempt to claim the last element in the restriction, such that the
restriction tracker
+ // doesn't throw an exception when checkDone is called
Review Comment:
Is this documented / designed behavior of restriction tracker (tracker is
considered done when the last element has been claimed, not all elements are
claimed)?
Thinking about this because recently I was implementing something that
turned out to rely on some internal behavior but then it broke as master evolves
--
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]