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

[prism] Add an idle shutdown timout to prism binary. #32276

Merged
merged 2 commits into from
Aug 22, 2024

Conversation

lostluck
Copy link
Contributor

Adding a flag --idle_shutdown_timeout to avoid SDKs leaving dangling prism processes after a job terminates.

  • Operates simply: Tracks the number of terminations, and compares to the number of started jobs. If they're equal, then start the idle timer.
  • Timer is cleared if there's a new job.
  • Initial timer set on start of prism process.
  • Currently only actively running jobs extend the timeout, and other actions (eg. via Job management) do not extend the timeout.
  • Negative durations do not idle shutdown.

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.

@lostluck lostluck requested a review from damondouglas August 21, 2024 23:32
@lostluck lostluck requested review from jrmccluskey and removed request for damondouglas August 22, 2024 00:06
@lostluck
Copy link
Contributor Author

R: @jrmccluskey

@lostluck lostluck added this to the 2.59.0 Release milestone Aug 22, 2024
@lostluck
Copy link
Contributor Author

This will end up being cherry picked into the release, along with an associated change to use them with the Java and Python runner wrappers.

Copy link
Contributor

Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control. If you'd like to restart, comment assign set of reviewers

Copy link
Contributor

@jrmccluskey jrmccluskey left a comment

Choose a reason for hiding this comment

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

LGTM, one docstring change

sdks/go/cmd/prism/prism.go Outdated Show resolved Hide resolved
Co-authored-by: Jack McCluskey <[email protected]>
@lostluck
Copy link
Contributor Author

Thank you very much!

@lostluck lostluck merged commit 995724d into apache:master Aug 22, 2024
7 checks passed
@lostluck lostluck deleted the prismIdle branch August 22, 2024 14:31
lostluck added a commit that referenced this pull request Aug 22, 2024
* Add an idle shutdown timout to prism binary.

* Correct flag text.

Co-authored-by: Jack McCluskey <[email protected]>

---------

Co-authored-by: lostluck <[email protected]>
Co-authored-by: Jack McCluskey <[email protected]>
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