Repository navigation
fix(objectstorage): stop initial range downloads on close - #2176
Merged
Max Smythe (maxsmythe) merged 1 commit intoOct 6, 2026
Merged
Max Smythe (maxsmythe) merged 1 commit into
Max Smythe (maxsmythe) merged 1 commit into
Conversation
Close the initial reader when the returned download reader is closed so an early close does not leave the first request running. Cancel the GCS request context before closing its body to prevent the SDK from reopening it.
Max Smythe (maxsmythe)
approved these changes
Oct 6, 2026
Max Smythe (maxsmythe)
left a comment
Collaborator
There was a problem hiding this comment.
LGTM, thank you for the PR!
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
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.
Closing a partially consumed download currently cancels later range requests but leaves the initial reader open.
Close that reader too, and cancel its GCS context before closing it to prevent the SDK from reopening the request. Add regression tests for closing the initial reader and canceling requests.
Refs #2155
go test -race ./pkg/objectstorage -count=1 -timeout 3mgo vet ./pkg/objectstorageand scopedgolangci-lint