-
Notifications
You must be signed in to change notification settings - Fork 4.5k
[#28543][prism] Garbage collect side inputs. #29423
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
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #29423 +/- ##
=======================================
Coverage 38.34% 38.34%
=======================================
Files 693 693
Lines 102237 102240 +3
=======================================
+ Hits 39202 39204 +2
Misses 61444 61444
- Partials 1591 1592 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
Assigning reviewers. If you would like to opt out of this review, comment R: @jrmccluskey for label go. Available commands:
The PR bot will only process comments in the main thread (not review comments). |
|
Run Go Prism Precommit |
|
It's looking like the standard PreCommit and Prism PreCommit (so, same runner) have been broken since I merged in Fusion. Looking into it. |
jrmccluskey
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For being a decently sized delta, this was surprisingly easy to follow for the most part.
|
Thanks! Holding off on merging this for a bit while I'm sorting out prism stability. Very likely not hurt or helped by this PR, but prudence. |
|
Scratch that. My client has extra println... so that "stability" bit was just the Examples failing. whoops. |
Until now, side inputs were handled separately from most of the data handling, leading to
them remaining un-garbage-collected, leading to a memory leak for long running streaming pipelines. This PR resolves that by moving Side Input Data handling into the elementmanager, which allows the data to be GCd once the output watermark for a stage has moved beyond where a given window's side input could be referenced.
As a refresher: A transform T with a side input S, can only access data from S that is in the Same Window W as a given Element. This is what gives the "blocking" behavior of side inputs for consumers. On the other side, the side input can thus be cleaned up if there's no data that remains to be processed by T, that can be projected onto W.
Necessary precursor to add state and timers in #28543, which has the same garbage collection behavior WRT a stages watermark.
Bonus changes:
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
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, commentfixes #<ISSUE NUMBER>instead.CHANGES.mdwith noteworthy changes.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)
See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.