Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix backlog reported by periodicsequence in python and go sdks to not include future outputs #32513

Merged
merged 2 commits into from
Sep 24, 2024

Conversation

scwhittle
Copy link
Contributor

@scwhittle scwhittle commented Sep 20, 2024

This affects monitoring and autoscaling decisons made by runners.
In particular the Dataflow runner utilizes this backlog bytes for autoscaling and unbounded periodic sequences previously reported a large backlog causing pipelines to upscale and not downscale.


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.

@scwhittle scwhittle force-pushed the periodic_sequence_python branch 5 times, most recently from 58705cd to c8670ae Compare September 23, 2024 12:50
@scwhittle scwhittle force-pushed the periodic_sequence_python branch from c8670ae to 77c969b Compare September 23, 2024 13:12
@scwhittle
Copy link
Contributor Author

Fixes #32506

@scwhittle scwhittle marked this pull request as ready for review September 23, 2024 13:42
@scwhittle scwhittle changed the title [WIP] fix backlog bytes periodicsequence in python and go sdks to not include future outputs Fix backlog reported by periodicsequence in python and go sdks to not include future outputs Sep 23, 2024
Copy link
Contributor

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

R: @tvalentyn for label python.
R: @jrmccluskey for label go.

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).

sdks/python/apache_beam/transforms/periodicsequence.py Outdated Show resolved Hide resolved

# On drain, immediately stop emitting new elements
def truncate(self, unused_element, unused_restriction):
return None


def sequence_backlog_bytes(element, now, offset_range):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this be an appropriate docstring?

"Calculates size of the output that the sequence should have emitted up to now"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@tvalentyn
Copy link
Contributor

would you mind adding to PR descritption why we want this change? thanks!

@scwhittle scwhittle force-pushed the periodic_sequence_python branch from 4525f14 to 723190a Compare September 24, 2024 13:57
@scwhittle
Copy link
Contributor Author

updated PR comment as well

@scwhittle scwhittle merged commit d93f93a into apache:master Sep 24, 2024
97 checks passed
@scwhittle scwhittle deleted the periodic_sequence_python branch September 24, 2024 21:10
reeba212 pushed a commit to reeba212/beam that referenced this pull request Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants