Skip to content
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

Object existence unknown #1638

Closed
joshuaseaton opened this issue Oct 25, 2019 · 2 comments
Closed

Object existence unknown #1638

joshuaseaton opened this issue Oct 25, 2019 · 2 comments
Assignees
Labels
api: storage Issues related to the Cloud Storage API. priority: p2 Moderately-important priority. Fix may not be included in next release. 🚨 This issue needs some love. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@joshuaseaton
Copy link

I have logic that checks the existence of an object:

obj := s.bucket.Object(name)
attrs, err := obj.Attrs(ctx)
if err == storage.ErrObjectNotExist {
	return false, nil
} else if err != nil {
	return false, fmt.Errorf("object %q: possibly exists remotely, but is in an unknown state: %v", name, err)
}
...

I recently saw that second 'unknown state' branch get hit - in trying to read a public bucket - with

...possibly exists remotely, but is in an unknown state: Get https://www.googleapis.com/storage/v1/b/fuchsia-artifacts/o/blobs%2F3790cd271285a8b59d804aeed16bc6027167028a03470b8c4f8702458108d3e2?alt=json&prettyPrint=false&projection=full: dial tcp 108.177.111.95:443: connect: connection refused
  • What happened here? Is this an unavoidable, transient issue?
  • Is there anything that can be done to mitigate this on the client side (either by me or upstream in the library)?

Thanks!

Client

Storage

Describe Your Environment

GCE instance
cores: 16
cpu: x64 | x86 | x86-64-Haswell_GCE | x86-64-avx2
gpu: none
kvm: true
machine_type: n1-standard-16
os: Debian | Debian-9.5 | Linux
ssd: true

@joshuaseaton
Copy link
Author

@frankyn, @jadekler if you could also take a look at this one, that would be very appreciated!

@jeanbza jeanbza added api: storage Issues related to the Cloud Storage API. triage me I really want to be triaged. labels Oct 25, 2019
@yoshi-automation yoshi-automation added the 🚨 This issue needs some love. label Oct 30, 2019
@frankyn frankyn added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. and removed 🚨 This issue needs some love. triage me I really want to be triaged. labels Oct 30, 2019
@yoshi-automation yoshi-automation added 🚨 This issue needs some love. triage me I really want to be triaged. labels Oct 30, 2019
@jeanbza jeanbza added priority: p2 Moderately-important priority. Fix may not be included in next release. and removed 🚨 This issue needs some love. triage me I really want to be triaged. labels Oct 31, 2019
@tritone tritone self-assigned this Nov 4, 2019
@tritone
Copy link
Contributor

tritone commented Nov 27, 2019

I did some research looking into this and I think that we should retry on connection refused errors. I have a PR up here if you'd like to take a look: https://code-review.googlesource.com/c/gocloud/+/48990 . @joshuaseaton I can add you if create an account on this gerrit instance.

@yoshi-automation yoshi-automation added 🚨 This issue needs some love. and removed 🚨 This issue needs some love. labels Mar 5, 2020
@yoshi-automation yoshi-automation added the 🚨 This issue needs some love. label Apr 22, 2020
albluque pushed a commit to monzo/google-cloud-go that referenced this issue Oct 13, 2020
Adds retry for connection reset and connection
refused errors for most operations (except for writes).

Splits invoke test into pre/post go1.10 versions in
order to not touch old code that is no longer covered
by CI.

Fixes googleapis#1638

Change-Id: Ie8f9857a49e1b4399b125dd9567db6d18b1d1dd8
Reviewed-on: https://code-review.googlesource.com/c/gocloud/+/55970
Reviewed-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Tyler Bui-Palsulich <tbp@google.com>
Reviewed-by: Frank Natividad <franknatividad@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the Cloud Storage API. priority: p2 Moderately-important priority. Fix may not be included in next release. 🚨 This issue needs some love. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

5 participants