Skip to content

pkg/blobserver/google/cloudstorage: don't overwrite a blob that's already present - #1287

Open
bobg wants to merge 2 commits into
perkeep:masterfrom
bobg:bobg/gcs-once
Open

bobg wants to merge 2 commits into
perkeep:masterfrom
bobg:bobg/gcs-once

Conversation

@bobg

@bobg bobg commented Dec 10, 2019 •

Copy link
Copy Markdown
Contributor

I've been encountering rate-limit-exceeded errors trying to dump a lot of files into a GCS backend (via pk-mount).

I thought what I needed was a rate limiter. That's #1285.

But the problem persisted and I discovered that the GCS blobserver was repeatedly re-uploading the same blob over and over (to wit: my PGP public key). So I wrote this PR, to skip uploading a blob if it's already present.

But that's still not good enough to make the rate-limit-exceeded errors go away. I figure this change is still a good one anyway, so here it is while I dig a bit more. Fixed in 18e8c5b by using an explicit call to Attrs before the call to NewWriter.

@googlebot googlebot added the cla: yes Author has submitted the Google CLA. label Dec 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes Author has submitted the Google CLA.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants