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

storage: Add exponential backoff for REFUSED_STREAM errors #701

Closed
lhecker opened this issue Jul 20, 2017 · 7 comments
Closed

storage: Add exponential backoff for REFUSED_STREAM errors #701

lhecker opened this issue Jul 20, 2017 · 7 comments
Assignees
Labels
api: storage Issues related to the Cloud Storage API. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Milestone

Comments

@lhecker
Copy link
Contributor

lhecker commented Jul 20, 2017

We're currently facing issues with GCS in production returning REFUSED_STREAM errors sporadically.
Would it be feasible to add the already existing exponential backoff logic (on 5xx and 429 errors) to REFUSED_STREAM errors as well?
It's currently in discussion for Go to add official support for this in golang/go#20985, but until then it'd be awesome if the Google Cloud client libraries could already implement this manually.

What do you think? 🙂

@bradfitz
Copy link
Contributor

Go won't have this until at least Go 1.10 so it makes sense to do it in the GCS library temporarily for 12-18 months until most Go users have the automatic version.

@s-mang
Copy link

s-mang commented Jul 25, 2017

@jba seems like we could just kill the check for if the error is a *googleapi.Error, no? Why is that there anyway? https://github.com/GoogleCloudPlatform/google-cloud-go/blob/master/storage/invoke.go#L32-L35

@jba jba self-assigned this Jul 27, 2017
@jba jba added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. api: storage Issues related to the Cloud Storage API. labels Jul 27, 2017
@jba jba added this to the Fixit 2017 Q3 milestone Jul 27, 2017
@lhecker
Copy link
Contributor Author

lhecker commented Jul 28, 2017

@jba Is there a recommended strategy for handling this "issue" with GCS somewhere by the way?
I'm just wondering if pooling with more connections as a prevention might not be the better option than retrying since the latency might be lower that way, right?

@jba
Copy link
Contributor

jba commented Jul 28, 2017

@lhecker I was planning on following the same logic that will be in Go 1.10.

@jba
Copy link
Contributor

jba commented Aug 9, 2017

@shadams I'd rather we be conservative in what we retry. If the error is permanent the client would hang, which is harder to diagnose than if it fails fast.

@lhecker I actually just added the error to the list we normally retry. Turned out to be the simplest fix.

@lhecker
Copy link
Contributor Author

lhecker commented Aug 9, 2017

@jba Thanks for the fix! We'll soon try it out again in production. 🙂
I do whonder though, if this really fixes the underlying usability problem with GCS... 🤔 Could it be it's actually (additionally?) a server side issue, where streams aren't load-balanced properly, for REFUSED_STREAM errors to not even happen? Because I've got the strong suspicion that this error might be HTTP/2-only and not happen with HTTP/1.1 at all, where you "naturally" use multiple TCP connections.

@jba
Copy link
Contributor

jba commented Aug 9, 2017

You may be right; I don't know what's happening at the server.

yoshi-automation added a commit that referenced this issue Feb 12, 2022
This is an auto-generated regeneration of the gapic clients by
cloud.google.com/go/internal/gapicgen. Once the corresponding genproto PR is
submitted, genbot will update this PR with a newer dependency to the newer
version of genproto and assign reviewers to this PR.

If you have been assigned to review this PR, please:

- Ensure that the version of genproto in go.mod has been updated.
- Ensure that CI is passing. If it's failing, it requires your manual attention.
- Approve and submit this PR if you believe it's ready to ship.

Corresponding genproto PR: googleapis/go-genproto#759

Changes:

chore(video/livestream): Configure Ruby generator for Video Live Stream clients
  PiperOrigin-RevId: 428111509
  Source-Link: googleapis/googleapis@7c7a99a

chore(servicemanagement): cleanup unused imports in google/api/servicemanagement/v1
  PiperOrigin-RevId: 428077790
  Source-Link: googleapis/googleapis@4807247

chore(dataplex): Configure Ruby generator for Dataplex clients
  PiperOrigin-RevId: 428067759
  Source-Link: googleapis/googleapis@1798403

fix(compute): fix breaking changes in Compute API (#701)

  Source-Link: googleapis/googleapis@272c110

fix(pubsub)!: removing misspelled field, add correctly spelled field
  PiperOrigin-RevId: 428023165
  Source-Link: googleapis/googleapis@63d374d

fix(osconfig/agentendpoint): Fix description of an interpreter field, validate if the field is not unspecified
  PiperOrigin-RevId: 427987153
  Source-Link: googleapis/googleapis@a1b62c1

fix(osconfig/agentendpoint): update third_party protos to the most actual version: - Add item that is affected by vulnerability - Add GetOsPolicyAssignmentReport and analogous List rpc method - Add Inventory to InstanceFilter - Add existing os_policy_assignment_reports.proto fixing the build - Mark methods as deprecated
  PiperOrigin-RevId: 427981818
  Source-Link: googleapis/googleapis@0b2c906

feat(compute): update compute API to revision 20220112 (#700)

  Source-Link: googleapis/googleapis@249e9a1
yoshi-automation added a commit that referenced this issue Feb 15, 2022
This is an auto-generated regeneration of the gapic clients by
cloud.google.com/go/internal/gapicgen. Once the corresponding genproto PR is
submitted, genbot will update this PR with a newer dependency to the newer
version of genproto and assign reviewers to this PR.

If you have been assigned to review this PR, please:

- Ensure that the version of genproto in go.mod has been updated.
- Ensure that CI is passing. If it's failing, it requires your manual attention.
- Approve and submit this PR if you believe it's ready to ship.

Corresponding genproto PR: googleapis/go-genproto#760

Changes:

feat(osconfig/agentendpoint): Add fields to RegisterAgentRequest:   - supported_capabilities   - os_long_name   - os_short_name   - os_version   - os_architecture feat: Add field to PatchConfig message:   - mig_instances_allowed fix: Add NONE Interpreter enum value that should be used over INTERPRETER_UNSPECIFIED in ExecStepConfig message
  PiperOrigin-RevId: 428781221
  Source-Link: googleapis/googleapis@f158f82

feat(servicemanagement)!: Remove EnableService and DisableService RPC methods and related protos from service management API BREAKING CHANGE:
  PiperOrigin-RevId: 428693468
  Source-Link: googleapis/googleapis@42a19d6

fix(security/privateca): Add google-cloud-location as a dependency for the privateca client
  PiperOrigin-RevId: 428624147
  Source-Link: googleapis/googleapis@d19f69b

chore(video/livestream): Configure Ruby generator for Video Live Stream clients
  PiperOrigin-RevId: 428111509
  Source-Link: googleapis/googleapis@7c7a99a

chore(servicemanagement): cleanup unused imports in google/api/servicemanagement/v1
  PiperOrigin-RevId: 428077790
  Source-Link: googleapis/googleapis@4807247

chore(dataplex): Configure Ruby generator for Dataplex clients
  PiperOrigin-RevId: 428067759
  Source-Link: googleapis/googleapis@1798403

fix(compute): fix breaking changes in Compute API (#701)

  Source-Link: googleapis/googleapis@272c110

fix(pubsub)!: removing misspelled field, add correctly spelled field
  PiperOrigin-RevId: 428023165
  Source-Link: googleapis/googleapis@63d374d

fix(osconfig/agentendpoint): Fix description of an interpreter field, validate if the field is not unspecified
  PiperOrigin-RevId: 427987153
  Source-Link: googleapis/googleapis@a1b62c1

fix(osconfig/agentendpoint): update third_party protos to the most actual version: - Add item that is affected by vulnerability - Add GetOsPolicyAssignmentReport and analogous List rpc method - Add Inventory to InstanceFilter - Add existing os_policy_assignment_reports.proto fixing the build - Mark methods as deprecated
  PiperOrigin-RevId: 427981818
  Source-Link: googleapis/googleapis@0b2c906

feat(compute): update compute API to revision 20220112 (#700)

  Source-Link: googleapis/googleapis@249e9a1
yoshi-automation added a commit that referenced this issue Feb 15, 2022
This is an auto-generated regeneration of the gapic clients by
cloud.google.com/go/internal/gapicgen. Once the corresponding genproto PR is
submitted, genbot will update this PR with a newer dependency to the newer
version of genproto and assign reviewers to this PR.

If you have been assigned to review this PR, please:

- Ensure that the version of genproto in go.mod has been updated.
- Ensure that CI is passing. If it's failing, it requires your manual attention.
- Approve and submit this PR if you believe it's ready to ship.

Corresponding genproto PR: googleapis/go-genproto#760

Changes:

feat(osconfig/agentendpoint): Add fields to RegisterAgentRequest:   - supported_capabilities   - os_long_name   - os_short_name   - os_version   - os_architecture feat: Add field to PatchConfig message:   - mig_instances_allowed fix: Add NONE Interpreter enum value that should be used over INTERPRETER_UNSPECIFIED in ExecStepConfig message
  PiperOrigin-RevId: 428781221
  Source-Link: googleapis/googleapis@f158f82

feat(servicemanagement)!: Remove EnableService and DisableService RPC methods and related protos from service management API BREAKING CHANGE:
  PiperOrigin-RevId: 428693468
  Source-Link: googleapis/googleapis@42a19d6

fix(security/privateca): Add google-cloud-location as a dependency for the privateca client
  PiperOrigin-RevId: 428624147
  Source-Link: googleapis/googleapis@d19f69b

chore(video/livestream): Configure Ruby generator for Video Live Stream clients
  PiperOrigin-RevId: 428111509
  Source-Link: googleapis/googleapis@7c7a99a

chore(servicemanagement): cleanup unused imports in google/api/servicemanagement/v1
  PiperOrigin-RevId: 428077790
  Source-Link: googleapis/googleapis@4807247

chore(dataplex): Configure Ruby generator for Dataplex clients
  PiperOrigin-RevId: 428067759
  Source-Link: googleapis/googleapis@1798403

fix(compute): fix breaking changes in Compute API (#701)

  Source-Link: googleapis/googleapis@272c110

fix(pubsub)!: removing misspelled field, add correctly spelled field
  PiperOrigin-RevId: 428023165
  Source-Link: googleapis/googleapis@63d374d

fix(osconfig/agentendpoint): Fix description of an interpreter field, validate if the field is not unspecified
  PiperOrigin-RevId: 427987153
  Source-Link: googleapis/googleapis@a1b62c1

fix(osconfig/agentendpoint): update third_party protos to the most actual version: - Add item that is affected by vulnerability - Add GetOsPolicyAssignmentReport and analogous List rpc method - Add Inventory to InstanceFilter - Add existing os_policy_assignment_reports.proto fixing the build - Mark methods as deprecated
  PiperOrigin-RevId: 427981818
  Source-Link: googleapis/googleapis@0b2c906

feat(compute): update compute API to revision 20220112 (#700)

  Source-Link: googleapis/googleapis@249e9a1
codyoss added a commit that referenced this issue Feb 15, 2022
* chore(all): auto-regenerate gapics

This is an auto-generated regeneration of the gapic clients by
cloud.google.com/go/internal/gapicgen. Once the corresponding genproto PR is
submitted, genbot will update this PR with a newer dependency to the newer
version of genproto and assign reviewers to this PR.

If you have been assigned to review this PR, please:

- Ensure that the version of genproto in go.mod has been updated.
- Ensure that CI is passing. If it's failing, it requires your manual attention.
- Approve and submit this PR if you believe it's ready to ship.

Corresponding genproto PR: googleapis/go-genproto#760

Changes:

feat(osconfig/agentendpoint): Add fields to RegisterAgentRequest:   - supported_capabilities   - os_long_name   - os_short_name   - os_version   - os_architecture feat: Add field to PatchConfig message:   - mig_instances_allowed fix: Add NONE Interpreter enum value that should be used over INTERPRETER_UNSPECIFIED in ExecStepConfig message
  PiperOrigin-RevId: 428781221
  Source-Link: googleapis/googleapis@f158f82

feat(servicemanagement): Remove EnableService and DisableService RPC methods and related protos from service management API BREAKING CHANGE:
  PiperOrigin-RevId: 428693468
  Source-Link: googleapis/googleapis@42a19d6

fix(security/privateca): Add google-cloud-location as a dependency for the privateca client
  PiperOrigin-RevId: 428624147
  Source-Link: googleapis/googleapis@d19f69b

chore(video/livestream): Configure Ruby generator for Video Live Stream clients
  PiperOrigin-RevId: 428111509
  Source-Link: googleapis/googleapis@7c7a99a

chore(servicemanagement): cleanup unused imports in google/api/servicemanagement/v1
  PiperOrigin-RevId: 428077790
  Source-Link: googleapis/googleapis@4807247

chore(dataplex): Configure Ruby generator for Dataplex clients
  PiperOrigin-RevId: 428067759
  Source-Link: googleapis/googleapis@1798403

fix(compute): fix breaking changes in Compute API (#701)

  Source-Link: googleapis/googleapis@272c110

fix(pubsub): removing misspelled field, add correctly spelled field
  PiperOrigin-RevId: 428023165
  Source-Link: googleapis/googleapis@63d374d

fix(osconfig/agentendpoint): Fix description of an interpreter field, validate if the field is not unspecified
  PiperOrigin-RevId: 427987153
  Source-Link: googleapis/googleapis@a1b62c1

fix(osconfig/agentendpoint): update third_party protos to the most actual version: - Add item that is affected by vulnerability - Add GetOsPolicyAssignmentReport and analogous List rpc method - Add Inventory to InstanceFilter - Add existing os_policy_assignment_reports.proto fixing the build - Mark methods as deprecated
  PiperOrigin-RevId: 427981818
  Source-Link: googleapis/googleapis@0b2c906

feat(compute): update compute API to revision 20220112 (#700)

  Source-Link: googleapis/googleapis@249e9a1

* go mod tidy

Co-authored-by: Cody Oss <codyoss@google.com>
Co-authored-by: Cody Oss <6331106+codyoss@users.noreply.github.com>
codyoss added a commit to codyoss/google-cloud-go that referenced this issue Feb 17, 2022
Some extra trailers got added to the regen commit so RP could not
process them. Re-listing the changes made in googleapis#5659 so they can get
picked up.

Changes:

feat(osconfig/agentendpoint): Add fields to RegisterAgentRequest:   - supported_capabilities   - os_long_name   - os_short_name   - os_version   - os_architecture feat: Add field to PatchConfig message:   - mig_instances_allowed fix: Add NONE Interpreter enum value that should be used over INTERPRETER_UNSPECIFIED in ExecStepConfig message
  PiperOrigin-RevId: 428781221
  Source-Link: googleapis/googleapis@f158f82

feat(servicemanagement): Remove EnableService and DisableService RPC methods and related protos from service management API BREAKING CHANGE:
  PiperOrigin-RevId: 428693468
  Source-Link: googleapis/googleapis@42a19d6

fix(security/privateca): Add google-cloud-location as a dependency for the privateca client
  PiperOrigin-RevId: 428624147
  Source-Link: googleapis/googleapis@d19f69b

chore(video/livestream): Configure Ruby generator for Video Live Stream clients
  PiperOrigin-RevId: 428111509
  Source-Link: googleapis/googleapis@7c7a99a

chore(servicemanagement): cleanup unused imports in google/api/servicemanagement/v1
  PiperOrigin-RevId: 428077790
  Source-Link: googleapis/googleapis@4807247

chore(dataplex): Configure Ruby generator for Dataplex clients
  PiperOrigin-RevId: 428067759
  Source-Link: googleapis/googleapis@1798403

fix(compute): fix breaking changes in Compute API (googleapis#701)

  Source-Link: googleapis/googleapis@272c110

fix(pubsub): removing misspelled field, add correctly spelled field
  PiperOrigin-RevId: 428023165
  Source-Link: googleapis/googleapis@63d374d

fix(osconfig/agentendpoint): Fix description of an interpreter field, validate if the field is not unspecified
  PiperOrigin-RevId: 427987153
  Source-Link: googleapis/googleapis@a1b62c1

fix(osconfig/agentendpoint): update third_party protos to the most actual version: - Add item that is affected by vulnerability - Add GetOsPolicyAssignmentReport and analogous List rpc method - Add Inventory to InstanceFilter - Add existing os_policy_assignment_reports.proto fixing the build - Mark methods as deprecated
  PiperOrigin-RevId: 427981818
  Source-Link: googleapis/googleapis@0b2c906

feat(compute): update compute API to revision 20220112 (googleapis#700)

  Source-Link: googleapis/googleapis@249e9a1
codyoss added a commit that referenced this issue Feb 17, 2022
Some extra trailers got added to the regen commit so RP could not
process them. Re-listing the changes made in #5659 so they can get
picked up.

Changes:

feat(osconfig/agentendpoint): Add fields to RegisterAgentRequest:   - supported_capabilities   - os_long_name   - os_short_name   - os_version   - os_architecture feat: Add field to PatchConfig message:   - mig_instances_allowed fix: Add NONE Interpreter enum value that should be used over INTERPRETER_UNSPECIFIED in ExecStepConfig message
  PiperOrigin-RevId: 428781221
  Source-Link: googleapis/googleapis@f158f82

feat(servicemanagement): Remove EnableService and DisableService RPC methods and related protos from service management API BREAKING CHANGE:
  PiperOrigin-RevId: 428693468
  Source-Link: googleapis/googleapis@42a19d6

fix(security/privateca): Add google-cloud-location as a dependency for the privateca client
  PiperOrigin-RevId: 428624147
  Source-Link: googleapis/googleapis@d19f69b

chore(video/livestream): Configure Ruby generator for Video Live Stream clients
  PiperOrigin-RevId: 428111509
  Source-Link: googleapis/googleapis@7c7a99a

chore(servicemanagement): cleanup unused imports in google/api/servicemanagement/v1
  PiperOrigin-RevId: 428077790
  Source-Link: googleapis/googleapis@4807247

chore(dataplex): Configure Ruby generator for Dataplex clients
  PiperOrigin-RevId: 428067759
  Source-Link: googleapis/googleapis@1798403

fix(compute): fix breaking changes in Compute API (#701)

  Source-Link: googleapis/googleapis@272c110

fix(pubsub): removing misspelled field, add correctly spelled field
  PiperOrigin-RevId: 428023165
  Source-Link: googleapis/googleapis@63d374d

fix(osconfig/agentendpoint): Fix description of an interpreter field, validate if the field is not unspecified
  PiperOrigin-RevId: 427987153
  Source-Link: googleapis/googleapis@a1b62c1

fix(osconfig/agentendpoint): update third_party protos to the most actual version: - Add item that is affected by vulnerability - Add GetOsPolicyAssignmentReport and analogous List rpc method - Add Inventory to InstanceFilter - Add existing os_policy_assignment_reports.proto fixing the build - Mark methods as deprecated
  PiperOrigin-RevId: 427981818
  Source-Link: googleapis/googleapis@0b2c906

feat(compute): update compute API to revision 20220112 (#700)
  Source-Link: googleapis/googleapis@249e9a1
This was referenced Feb 17, 2022
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: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. 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

4 participants