Skip to content

PBM-1506 GCS support concurrent downloading #1104

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 12 commits into from
Mar 20, 2025

Conversation

veceraj
Copy link
Collaborator

@veceraj veceraj commented Mar 13, 2025

PR for https://perconadev.atlassian.net/browse/PBM-1506

It reintroduces the ability to download a single large file in parallel for Google Cloud Storage (GCS) after introducing Google's native SDK.

Users can speed up restores by using multiple workers to download big files in parallel. With these changes, it will be available for S3 and GCS but has been made with consideration of supporting additional storage types in the future.

The changes reuse the existing logic from the S3 download module.

@veceraj veceraj marked this pull request as ready for review March 19, 2025 07:45
@veceraj veceraj requested a review from boris-ilijic as a code owner March 19, 2025 07:45
obj := bucketHandle.Object(path.Join(g.opts.Prefix, fname))
reader, err := obj.NewRangeReader(ctx, start, length)
if err != nil {
if errors.Is(err, gcs.ErrObjectNotExist) || (err != nil && isRangeNotSatisfiable(err)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if errors.Is(err, gcs.ErrObjectNotExist) || (err != nil && isRangeNotSatisfiable(err)) {
if errors.Is(err, gcs.ErrObjectNotExist) || isRangeNotSatisfiable(err) {

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

err is already != nil

@boris-ilijic boris-ilijic merged commit e2c5d52 into dev Mar 20, 2025
23 checks passed
@boris-ilijic boris-ilijic deleted the PBM-1506-GCS-support-concurrent-downloading branch March 20, 2025 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants