Repository navigation
blob/azureblob: parallel downloads via driver.DownloaderAt - #3808
Merged
Merged
Conversation
Collaborator
|
Please sync now that #3805 is merged. |
stanhu
force-pushed
the
sh-azureblob-parallel-download
branch
from
November 1, 2026 06:39
bb7d34f to
7dba885
Compare
stanhu
marked this pull request as ready for review
November 1, 2026 06:41
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3808 +/- ##
==========================================
- Coverage 80.38% 80.13% -0.26%
==========================================
Files 104 104
Lines 12405 12449 +44
==========================================
+ Hits 9972 9976 +4
- Misses 2432 2472 +40
Partials 1 1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
vangent
reviewed
Nov 1, 2026
| if err != nil { | ||
| return err | ||
| } | ||
| defer resp.Body.Close() |
Collaborator
|
Please sync again, you probably will have to update |
stanhu
force-pushed
the
sh-azureblob-parallel-download
branch
from
November 2, 2026 17:49
7dba885 to
fe9337f
Compare
vangent
reviewed
Nov 2, 2026
stanhu
force-pushed
the
sh-azureblob-parallel-download
branch
from
November 2, 2026 18:33
fe9337f to
33cb6d1
Compare
Implement DownloadAt using the azblob DownloadFile helper, a method on the same *blob.Client the driver already uses, so this adds no new import or dependency. When the destination is an *os.File it downloads the blob in parallel blocks; for any other io.WriterAt it falls back to a single sequential stream, since azblob has no parallel download into a generic io.WriterAt. ReaderOptions.BufferSize and MaxConcurrency map onto the DownloadFile block size and concurrency; both default to the azblob default. With this, blob.Bucket.Download into an *os.File (with AllowParallelDownload set) fetches Azure blobs in parallel instead of on a single stream. SkipDownloadAt is set to true in the conformance harness for now, since there is no recorded interaction for the DownloadAt test on Azure yet. Part of google#3804
stanhu
force-pushed
the
sh-azureblob-parallel-download
branch
from
November 2, 2026 18:35
33cb6d1 to
78a55b2
Compare
vangent
approved these changes
Nov 2, 2026
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.
Builds on #3805 and #3806 (both merged). Rebased onto master; contains only its own change.
What
Implements
driver.DownloaderAtin azureblob, soBucket.Downloadinto an*os.File(withAllowParallelDownloadset) fetches Azure blobs with parallel blocks instead of a single stream.How
Uses the azblob
DownloadFilehelper, a method on the same*blob.Clientthe driver already uses forDownloadStream, so no new import or dependency. It reuses the driver's existing client.Azure's parallel download helpers only accept
*os.File(DownloadFile) or[]byte(DownloadBuffer); there is no parallel download into a genericio.WriterAt. So:*os.Filedestination ->DownloadFile(parallel blocks).io.WriterAt-> single sequentialDownloadStream+ copy, which is correct but not parallel.ReaderOptions.BufferSizeandMaxConcurrency(added in #3806) map ontoDownloadFileOptions.BlockSizeandConcurrencyon the parallel path; both default to the azblob default.BeforeReadexposes*blob.DownloadFileOptions/*blob.Clienton the parallel path, and*blob.DownloadStreamOptionson the fallback.Testing
go vet,gofmtclean. Compile-timevar _ driver.DownloaderAt = (*bucket)(nil)assertion.blob(theAllowParallelDownloadgate +DownloadAt).SkipDownloadAtistruein the conformance harness for now; I don't have Azure credentials to record theDownloadAtinteraction. Happy to drop that once someone with CI creds records it.