Title: Make Cloud Storage client retry on backend error · Issue #3586 · googleapis/google-cloud-java · GitHub
Open Graph Title: Make Cloud Storage client retry on backend error · Issue #3586 · googleapis/google-cloud-java
X Title: Make Cloud Storage client retry on backend error · Issue #3586 · googleapis/google-cloud-java
Description: We're operating at scale on GCS and are regularly experiencing transient HTTP 410 status codes when accessing Cloud storage. Those 410 status codes returned by Cloud storage are bogus though, as they are effectively just hiding an intern...
Open Graph Description: We're operating at scale on GCS and are regularly experiencing transient HTTP 410 status codes when accessing Cloud storage. Those 410 status codes returned by Cloud storage are bogus though, as th...
X Description: We're operating at scale on GCS and are regularly experiencing transient HTTP 410 status codes when accessing Cloud storage. Those 410 status codes returned by Cloud storage are bogus though, a...
Opengraph URL: https://github.com/googleapis/google-cloud-java/issues/3586
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Make Cloud Storage client retry on backend error","articleBody":"We're operating at scale on GCS and are regularly experiencing transient [HTTP 410 status codes](https://cloud.google.com/storage/docs/json_api/v1/status-codes#410_Gone) when accessing Cloud storage. Those 410 status codes returned by Cloud storage are bogus though, as they are effectively just hiding an internal backend error on GCS, which is reflected in the error details:\r\n\r\n```\r\nCaused by: com.google.api.client.googleapis.json.GoogleJsonResponseException: \r\n410 Gone { \"code\" : 503, \"errors\" : [ { \"domain\" : \"global\", \"message\" : \"Backend Error\", \"reason\" : \"backendError\" } ], \"message\" : \"Backend Error\" }\r\n```\r\n\r\nThe google-cloud-storage client does not treat the 410 status code as retryable, understandibly so. It should be retrying on backend errors, though, which are typically exposed with status code 500 or 503. **I'm suggesting to treat backend errors in the client [in the same way as it treats internal errors](https://github.com/GoogleCloudPlatform/google-cloud-java/blob/master/google-cloud-clients/google-cloud-storage/src/main/java/com/google/cloud/storage/StorageException.java#L45), namely match on `reason == backendError` independently of HTTP status code.**\r\n\r\nNote that we're not the first ones to experience this, and the client should be resilient against these transient GCS errors.\r\n- https://stackoverflow.com/questions/33056415/uploading-files-into-google-cloud-storage-500-backend-error\r\n- https://stackoverflow.com/questions/35125891/google-cloud-dataflow-jobs-failing-inaccessible-jars-410-gone-errors\r\n- https://stackoverflow.com/questions/41215541/dataflow-jobs-fail-after-a-few-410-errors-while-writing-to-gcs","author":{"url":"https://github.com/ywelsch","@type":"Person","name":"ywelsch"},"datePublished":"2018-08-21T08:23:39.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/3586/google-cloud-java/issues/3586"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d4698b91-702c-bfcb-f1c9-3cfc1f297043 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C82C:316D26:1718D71:2154BC7:6A4CE62C |
| html-safe-nonce | 5d1b6f390001865f1d268c92553c13ff1b4f817b657c8629d289e51356e9a4ab |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDODJDOjMxNkQyNjoxNzE4RDcxOjIxNTRCQzc6NkE0Q0U2MkMiLCJ2aXNpdG9yX2lkIjoiMzUyODE3OTE5MjkyNjM2NTIyOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 8183b877c09be358c7615c9ea0e3f6b62dcb43829d3b5b00fdcff6dac0213deb |
| hovercard-subject-tag | issue:352434420 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/google-cloud-java/3586/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6a9e2d1f82075a2a18ee393a6611a9144b307f8d86cf3f5f761120e48e50ba8b/googleapis/google-cloud-java/issues/3586 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6a9e2d1f82075a2a18ee393a6611a9144b307f8d86cf3f5f761120e48e50ba8b/googleapis/google-cloud-java/issues/3586 |
| og:image:alt | We're operating at scale on GCS and are regularly experiencing transient HTTP 410 status codes when accessing Cloud storage. Those 410 status codes returned by Cloud storage are bogus though, as th... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ywelsch |
| hostname | github.com |
| expected-hostname | github.com |
| None | 299b43bca6e02ad35197ffeba30d2466846d5fb02ab96fbced5b5e6cec589fb8 |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/google-cloud-java git https://github.com/googleapis/google-cloud-java.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 26181278 |
| octolytics-dimension-repository_nwo | googleapis/google-cloud-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 26181278 |
| octolytics-dimension-repository_network_root_nwo | googleapis/google-cloud-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | c5a57f04eeb310f57c73fd6d751d957e2ca27ed2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width