Skip to content

Conversation

@james-rms
Copy link
Contributor

@james-rms james-rms commented Oct 13, 2025

Which issue does this PR close?

Closes #504

What changes are included in this PR?

  • Implement resumable uploads for GCP
  • Add GCPClientBuilder option to use resumable uploads rather than multipart uploads

Are there any user-facing changes?

Yes, see changes to the client builder.


#[derive(Debug)]
struct GCSResumableUpload {
state: Arc<ResumableState>,
Copy link
Contributor

@tustvold tustvold Oct 13, 2025

Choose a reason for hiding this comment

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

Why do we need to use Arc and atomics here, AFAICT there isn't an obvious reason for this?

Edit: Oh I see, it is to try to prevent concurrent put part... NGL kind of feels like we're trying to shoehorn something into an interface that doesn't really fit...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a fair judgement.

Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if we could use https://docs.rs/tokio/latest/tokio/sync/struct.Notify.html to serialise the uploads, I think this would be more in keeping with the design than erroring if polled concurrently

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We could, but i'm not sure if it's in keeping with the design enough to not break something. I was worried about applications that try to do parallel upload and being surprised that most of their tasks are stalled.

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.

implement GCS resumable uploads as a multipart upload method

2 participants