Repository navigation
fix(storage): update PartSize documentation and optimize cleanup - #19930
Conversation
There was a problem hiding this comment.
Code Review
This pull request renames PartSize to PartSizeHint in ParallelUploadConfig, increases the minimum part size from 5 MiB to 8 MiB, and updates the associated tests. It also optimizes cleanup by enabling automatic deletion of source objects during compose operations (DeleteSourceObjects = true) and updating the local cleanup logic to run only when an upload fails and the final compose does not succeed. Feedback was provided regarding the background cleanup goroutine, which currently uses the potentially canceled parent context. To prevent temporary object leaks when a context is canceled, it is recommended to use context.WithoutCancel for the cleanup operation.
019cc59 to
416ad6d
Compare
|
|
||
| interHandle := s.w.o.c.Bucket(s.w.o.bucket).Object(compName) | ||
| composer := interHandle.ComposerFrom(finalComps[start:end]...) | ||
| composer.DeleteSourceObjects = true |
There was a problem hiding this comment.
Should this be an option exposed to the user?
There was a problem hiding this comment.
no, doesn't add much value and we do not want to expose the intricacies of how parallel upload is being done.
setError ignores context.Canceled, so gating cleanup on firstErr skipped cleanup for cancelled uploads and leaked temporary parts. Cleanup now runs whenever the final compose did not succeed.
With DeleteSourceObjects, a successful intermediate compose removes its sources server-side. If a later compose fails, cleanup would log a not-found error for each of those parts. Skip ErrObjectNotExist.
🤖 I have created a release *beep* *boop* --- ## [1.69.0](storage/v1.68.0...storage/v1.69.0) (2026-10-01) ### Features * **all:** Update supported go versions ([#20520](#20520)) ([90413d3](90413d3)) * **storage:** Add read stall retry for gRPC storage client ([#20525](#20525)) ([8bfc486](8bfc486)) ### Bug Fixes * **storage:** Add App Hub storage.googleapis.com prefix to destination.id ([#20569](#20569)) ([2bca92a](2bca92a)) * **storage:** Follow-ups for read stall retry ([#20577](#20577)) ([24eacd5](24eacd5)) * **storage:** Update PartSize documentation and optimize cleanup ([#19930](#19930)) ([3d09abf](3d09abf)) * **various:** Address format directive issues ([#20547](#20547)) ([e2e1047](e2e1047)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
No description provided.