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

[#28142][Go SDK] Evict closed readers from the cache. #30119

Merged
merged 1 commit into from
Jan 26, 2024

Conversation

lostluck
Copy link
Contributor

Resolve a memory leak as a result of the Data Manager read cache not evicting data streams for which it had not known it had seen all the data streams.

See the new comment in the code for details.

We don't take the alternative approach of checking the DataChannel's endedInstruction cache because it's possible that cache of instruction references might have a gap, with more than the current cache cap of ended instructions cycling through before the data channel is triggered to observe it. Best to check the cache's contents directly.

Fixes #28142.

I'm not sure how to test for this unfortunately without significantly changing the code, as it's a goroutine local cache, and adding additional synchronization is undesirable.

While this regression has been in the SDK for a while (since around February 2023) I'd like to cherry pick it into the 2.54.0 release so the ever patient user can finally upgrade to a newer SDK version.


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 added this to the 2.54.0 Release milestone Jan 25, 2024
@github-actions github-actions bot added the go label Jan 25, 2024
Copy link

codecov bot commented Jan 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (3ae8518) 38.42% compared to head (4a09c43) 38.42%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #30119   +/-   ##
=======================================
  Coverage   38.42%   38.42%           
=======================================
  Files         697      697           
  Lines      102214   102217    +3     
=======================================
+ Hits        39272    39275    +3     
  Misses      61315    61315           
  Partials     1627     1627           
Flag Coverage Δ
go 54.18% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

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

@jrmccluskey jrmccluskey merged commit e0e20a1 into apache:master Jan 26, 2024
9 checks passed
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.

[Bug]: [Go SDK] Memory seems to be leaking on 2.49.0 with Dataflow
2 participants