beam icon indicating copy to clipboard operation
beam copied to clipboard

[KafkaIO] Report unknown backlog size when latest offset lags behind next offset

Open sjvanrossum opened this issue 7 months ago • 3 comments

The periodic refresh of a partition's end offset may lag behind the consumption from that partition.

Instead of reporting no backlog when latestOffset < nextOffset the backlog should be reported as unknown (represented by -1).


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • [ ] Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
  • [ ] Update CHANGES.md with noteworthy changes.
  • [ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels Python tests Java tests Go tests

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

sjvanrossum avatar May 29 '25 19:05 sjvanrossum

Assigning reviewers:

R: @chamikaramj for label java. R: @Dippatel98 for label kafka.

Note: If you would like to opt out of this review, comment assign to next reviewer.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

github-actions[bot] avatar May 29 '25 21:05 github-actions[bot]

Reminder, please take a look at this pr: @chamikaramj @Dippatel98

github-actions[bot] avatar Jun 06 '25 12:06 github-actions[bot]

Assigning new set of reviewers because Pr has gone too long without review. If you would like to opt out of this review, comment assign to next reviewer:

R: @robertwb for label java. R: @johnjcasey for label kafka.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

github-actions[bot] avatar Jun 10 '25 12:06 github-actions[bot]

Reminder, please take a look at this pr: @robertwb @johnjcasey

github-actions[bot] avatar Jun 18 '25 12:06 github-actions[bot]

Assigning new set of reviewers because Pr has gone too long without review. If you would like to opt out of this review, comment assign to next reviewer:

R: @kennknowles for label java. R: @liferoad for label kafka.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

github-actions[bot] avatar Jun 23 '25 12:06 github-actions[bot]

Reminder, please take a look at this pr: @kennknowles @liferoad

github-actions[bot] avatar Jul 01 '25 12:07 github-actions[bot]

I actually wonder if this could have weird issues? I guess the presumption of the prior code is that we are "caught up" if the next offset has caught up to the latest offset. This could be temporarily incorrect, waiting on the next refresh, but that could be better than oscillating between unknown & known backlog numbers?

kennknowles avatar Jul 02 '25 21:07 kennknowles

Reminder, please take a look at this pr: @kennknowles @liferoad

github-actions[bot] avatar Jul 10 '25 12:07 github-actions[bot]

I actually wonder if this could have weird issues? I guess the presumption of the prior code is that we are "caught up" if the next offset has caught up to the latest offset. This could be temporarily incorrect, waiting on the next refresh, but that could be better than oscillating between unknown & known backlog numbers?

@sjvanrossum are we good to merge this PR?

liferoad avatar Jul 11 '25 14:07 liferoad

@liferoad yes, this is good to merge. 👍

sjvanrossum avatar Jul 11 '25 19:07 sjvanrossum