You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "lostluck (via GitHub)" <gi...@apache.org> on 2023/11/14 00:01:36 UTC
[PR] [#28543][prism] Garbage collect side inputs. [beam]
lostluck opened a new pull request, #29423:
URL: https://github.com/apache/beam/pull/29423
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:
* Annotated some coder look up errors in the SDK's execution bundle translation, to clarify what was actually failing. The issue that needed this debugging was due to removing the calls that added the coders to the bundle's components.
* Removed some extra map nesting around side inputs.
------------------------
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](https://www.apache.org/licenses/icla.pdf).
See the [Contributor Guide](https://beam.apache.org/contribute) for more tips on [how to make review process smoother](https://github.com/apache/beam/blob/master/CONTRIBUTING.md#make-the-reviewers-job-easier).
To check the build health, please visit [https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md](https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md)
GitHub Actions Tests Status (on master branch)
------------------------------------------------------------------------------------------------
[](https://github.com/apache/beam/actions?query=workflow%3A%22Build+python+source+distribution+and+wheels%22+branch%3Amaster+event%3Aschedule)
[](https://github.com/apache/beam/actions?query=workflow%3A%22Python+Tests%22+branch%3Amaster+event%3Aschedule)
[](https://github.com/apache/beam/actions?query=workflow%3A%22Java+Tests%22+branch%3Amaster+event%3Aschedule)
[](https://github.com/apache/beam/actions?query=workflow%3A%22Go+tests%22+branch%3Amaster+event%3Aschedule)
See [CI.md](https://github.com/apache/beam/blob/master/CI.md) for more information about GitHub Actions CI or the [workflows README](https://github.com/apache/beam/blob/master/.github/workflows/README.md) to see a list of phrases to trigger workflows.
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#28543][prism] Garbage collect side inputs. [beam]
Posted by "lostluck (via GitHub)" <gi...@apache.org>.
lostluck commented on PR #29423:
URL: https://github.com/apache/beam/pull/29423#issuecomment-1809367281
Run Go Prism Precommit
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#28543][prism] Garbage collect side inputs. [beam]
Posted by "lostluck (via GitHub)" <gi...@apache.org>.
lostluck merged PR #29423:
URL: https://github.com/apache/beam/pull/29423
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#28543][prism] Garbage collect side inputs. [beam]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #29423:
URL: https://github.com/apache/beam/pull/29423#issuecomment-1809330104
## [Codecov](https://app.codecov.io/gh/apache/beam/pull/29423?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
Attention: `30 lines` in your changes are missing coverage. Please review.
> Comparison is base [(`618d7a8`)](https://app.codecov.io/gh/apache/beam/commit/618d7a8f2c6520bfae1ca84dced7fd39d7af45f4?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) 38.34% compared to head [(`d4c28f0`)](https://app.codecov.io/gh/apache/beam/pull/29423?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) 38.34%.
> Report is 2 commits behind head on master.
| [Files](https://app.codecov.io/gh/apache/beam/pull/29423?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [...am/runners/prism/internal/engine/elementmanager.go](https://app.codecov.io/gh/apache/beam/pull/29423?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c2Rrcy9nby9wa2cvYmVhbS9ydW5uZXJzL3ByaXNtL2ludGVybmFsL2VuZ2luZS9lbGVtZW50bWFuYWdlci5nbw==) | 73.46% | [13 Missing :warning: ](https://app.codecov.io/gh/apache/beam/pull/29423?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [sdks/go/pkg/beam/core/runtime/graphx/coder.go](https://app.codecov.io/gh/apache/beam/pull/29423?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZ3JhcGh4L2NvZGVyLmdv) | 0.00% | [7 Missing :warning: ](https://app.codecov.io/gh/apache/beam/pull/29423?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [sdks/go/pkg/beam/runners/prism/internal/stage.go](https://app.codecov.io/gh/apache/beam/pull/29423?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c2Rrcy9nby9wa2cvYmVhbS9ydW5uZXJzL3ByaXNtL2ludGVybmFsL3N0YWdlLmdv) | 86.53% | [6 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/beam/pull/29423?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [sdks/go/pkg/beam/core/runtime/exec/translate.go](https://app.codecov.io/gh/apache/beam/pull/29423?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZXhlYy90cmFuc2xhdGUuZ28=) | 0.00% | [1 Missing :warning: ](https://app.codecov.io/gh/apache/beam/pull/29423?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [sdks/go/pkg/beam/runners/prism/internal/execute.go](https://app.codecov.io/gh/apache/beam/pull/29423?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c2Rrcy9nby9wa2cvYmVhbS9ydW5uZXJzL3ByaXNtL2ludGVybmFsL2V4ZWN1dGUuZ28=) | 83.33% | [0 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/beam/pull/29423?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...o/pkg/beam/runners/prism/internal/worker/worker.go](https://app.codecov.io/gh/apache/beam/pull/29423?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c2Rrcy9nby9wa2cvYmVhbS9ydW5uZXJzL3ByaXNtL2ludGVybmFsL3dvcmtlci93b3JrZXIuZ28=) | 50.00% | [1 Missing :warning: ](https://app.codecov.io/gh/apache/beam/pull/29423?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
<details><summary>Additional details and impacted files</summary>
```diff
@@ 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
```
| [Flag](https://app.codecov.io/gh/apache/beam/pull/29423/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [go](https://app.codecov.io/gh/apache/beam/pull/29423/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `53.51% <74.78%> (+<0.01%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/beam/pull/29423?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#28543][prism] Garbage collect side inputs. [beam]
Posted by "lostluck (via GitHub)" <gi...@apache.org>.
lostluck commented on PR #29423:
URL: https://github.com/apache/beam/pull/29423#issuecomment-1811857279
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.
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#28543][prism] Garbage collect side inputs. [beam]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #29423:
URL: https://github.com/apache/beam/pull/29423#issuecomment-1809366744
Assigning reviewers. If you would like to opt out of this review, comment `assign to next reviewer`:
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).
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#28543][prism] Garbage collect side inputs. [beam]
Posted by "lostluck (via GitHub)" <gi...@apache.org>.
lostluck commented on PR #29423:
URL: https://github.com/apache/beam/pull/29423#issuecomment-1809429822
It's looking like the standard PreCommit and Prism PreCommit (so, same runner) have been broken since I merged in Fusion. Looking into it.
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#28543][prism] Garbage collect side inputs. [beam]
Posted by "lostluck (via GitHub)" <gi...@apache.org>.
lostluck commented on PR #29423:
URL: https://github.com/apache/beam/pull/29423#issuecomment-1811866031
Scratch that. My client has extra println... so that "stability" bit was just the Examples failing. whoops.
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org