-
Notifications
You must be signed in to change notification settings - Fork 107
PBM-1490: Enable Downloader
for split-merge
middleware
#1192
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
base: dev
Are you sure you want to change the base?
Conversation
Downloader public methods are merged with S3 storage.
Downloader public methods are merged with GCS storage.
Method returns download statistics. Currently it's only implemented for S3 and GCS. Other storaget types returns zero value.
Downloader
for split-merge
middleware
bc8d6ba
to
b414148
Compare
b414148
to
5ebc206
Compare
If maxObjSizeGB has invalid value (zero or less than zero) PBM will apply default value for it (the same as it is not specified withing config).
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.
Pull Request Overview
This PR enables the Downloader
functionality for the split-merge
middleware by implementing the DownloadStat()
method across all storage implementations and refactoring the physical restore process to use a unified storage configuration approach.
- Adds
DownloadStat()
method to the storage interface and implements it for all storage types - Creates
StorageWithDownloaderFromConfig()
function to configure storage with downloader capabilities for S3 and GCS - Refactors physical restore to use the new unified storage configuration instead of type-specific downloader instantiation
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
pbm/util/storage.go | Adds new function to create storage with downloader configuration for S3/GCS types |
pbm/storage/storage.go | Extends storage interface with DownloadStat method |
pbm/storage/split_merge_mw.go | Implements DownloadStat method for split-merge middleware |
pbm/storage/s3/s3.go | Adds NewWithDownloader function and refactors downloader initialization |
pbm/storage/s3/download.go | Consolidates download functionality and replaces interface{} with any |
pbm/storage/gcs/gcs.go | Adds NewWithDownloader function for GCS storage |
pbm/storage/gcs/download.go | Consolidates GCS download functionality |
pbm/storage/fs/fs.go | Implements empty DownloadStat method for filesystem storage |
pbm/storage/blackhole/blackhole.go | Implements empty DownloadStat method for blackhole storage |
pbm/storage/azure/azure.go | Implements empty DownloadStat method for Azure storage |
pbm/restore/physical.go | Refactors to use new unified storage configuration approach |
pbm/restore/logical_cfgsvr_full_test.go | Implements DownloadStat method for test storage |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
This is additional improvement for #1183:
Downloader
logic for thesplit-merge
middleware by implementing theDownloadStat
method across all storages and providing constructor for downloader creation.maxObjSizeGB
value in case of invalid configuration value (e.g. 0 or less than 0).