-
Notifications
You must be signed in to change notification settings - Fork 1.5k
fix(storage): free buffers in Bidi Reader #12839
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fixes a bug where in the gRPC Bidi Reader code path, allocated buffers were not being freed back to the buffer pool after the messages were read in some cases. Also adds an emulator test to check for leaks in the codec code for Reader and MultiRangeDownloader
cojenco
approved these changes
Sep 9, 2025
BrennaEpp
reviewed
Sep 10, 2025
|
|
||
| // Test that successful downloads using Reader and MultiRangeDownloader free | ||
| // all of their allocated buffers. | ||
| func TestReadCodecLeaksEmulated(t *testing.T) { |
Contributor
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.
Nice. It would be good to test retries as well here.
Contributor
Author
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.
Good idea; I'll do this in a separate PR.
tritone
added a commit
that referenced
this pull request
Sep 11, 2025
Fixes a bug where in the gRPC Bidi Reader code path, allocated buffers were not being freed back to the buffer pool after the messages were read in some cases. Also adds an emulator test to check for leaks in the codec code for Reader and MultiRangeDownloader
tritone
added a commit
that referenced
this pull request
Sep 12, 2025
🤖 I have created a release *beep* *boop* --- ## [1.56.2](storage/v1.56.1...storage/v1.56.2) (2025-09-12) ### Bug Fixes * **storage:** Free buffers in Bidi Reader ([#12839](#12839)) ([10c8fac](10c8fac)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
gcf-merge-on-green bot
pushed a commit
that referenced
this pull request
Sep 23, 2025
🤖 I have created a release *beep* *boop* --- ## [1.57.0](https://togithub.com/googleapis/google-cloud-go/compare/storage/v1.56.1...storage/v1.57.0) (2025-09-23) ### Features * **storage/control:** Add new GetIamPolicy, SetIamPolicy, and TestIamPermissions RPCs ([d73f912](https://togithub.com/googleapis/google-cloud-go/commit/d73f9123be77bb3278f48d510cd0fb22feb605bc)) * **storage:** Post support dynamic key name ([#12677](https://togithub.com/googleapis/google-cloud-go/issues/12677)) ([9e761f9](https://togithub.com/googleapis/google-cloud-go/commit/9e761f961a2c4351b3e0793ed655314ac5853903)) * **storage:** WithMeterProvider allows custom meter provider configuration ([#12668](https://togithub.com/googleapis/google-cloud-go/issues/12668)) ([7f574b0](https://togithub.com/googleapis/google-cloud-go/commit/7f574b01e0b454c1ef5c13e6a58075e394ee990d)) ### Bug Fixes * **storage:** Free buffers in Bidi Reader ([#12839](https://togithub.com/googleapis/google-cloud-go/issues/12839)) ([bc247fd](https://togithub.com/googleapis/google-cloud-go/commit/bc247fdc3f5234a8bd6934e58d5b0b578f1335cb)) * **storage:** Make Writer thread-safe. ([#12753](https://togithub.com/googleapis/google-cloud-go/issues/12753)) ([9ea380b](https://togithub.com/googleapis/google-cloud-go/commit/9ea380bea5b980a9054d201be4f315a195da2182)) * **storage:** No progress report for oneshot write ([#12746](https://togithub.com/googleapis/google-cloud-go/issues/12746)) ([b97c286](https://togithub.com/googleapis/google-cloud-go/commit/b97c286ec369a10a81b1a8a3a1aae18b46d2dfbc)) ### Performance Improvements * **storage:** Pipeline gRPC writes ([#12422](https://togithub.com/googleapis/google-cloud-go/issues/12422)) ([1f2c5fe](https://togithub.com/googleapis/google-cloud-go/commit/1f2c5fe2843724302086fe04cb8dab8b515969c5)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
vanja-p
added a commit
to buildbuddy-io/buildbuddy
that referenced
this pull request
Oct 10, 2025
I'd like to pick up a [bug fix](googleapis/google-cloud-go#12839) and a [write performance improvement](googleapis/google-cloud-go#12422)
vanja-p
added a commit
to buildbuddy-io/buildbuddy
that referenced
this pull request
Oct 13, 2025
I'd like to pick up googleapis/google-cloud-go#12839 and googleapis/google-cloud-go#12422 This PR is the result of running `bazel run go get cloud.google.com/go/storage`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes a bug where in the gRPC Bidi Reader code path, allocated buffers were not being freed back to the buffer pool after the messages were read in some cases.
Also adds an emulator test to check for leaks in the codec code for Reader and MultiRangeDownloader