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

Question: Handling 410 Gone errors when flushing buffer in BlobWriteChannel #5704

Closed
viraj071 opened this issue Jul 8, 2019 · 1 comment
Closed
Assignees
Labels
api: storage Issues related to the Cloud Storage API. type: question Request for information or clarification. Not an issue.

Comments

@viraj071
Copy link

viraj071 commented Jul 8, 2019

We are using GCS to store blob files. We provide a GCS implementation of an interface provided by an internal library. The implementation returns a WritableByteChannel which is used by the library. This means, adding a retry logic is not an easy option for us. Looking at the stack trace below, we see that it is created in the BlobWriteChannel.flushBuffer method.

Questions:

  1. Does the SDK retry by default?
  2. Is there any way for me to retry on such errors by configuration etc?
Caused by: com.google.cloud.storage.StorageException: 410 Gone
 {
  "error": {
   "errors": [
    {
     "domain": "global",
     "reason": "backendError",
     "message": "Backend Error"
    }
   ],
   "code": 500,
   "message": "Backend Error"
  }
 }
 
 at com.google.cloud.storage.spi.v1.HttpStorageRpc.translate(HttpStorageRpc.java:227)
 at com.google.cloud.storage.spi.v1.HttpStorageRpc.write(HttpStorageRpc.java:762)
 at com.google.cloud.storage.BlobWriteChannel$1.run(BlobWriteChannel.java:51)
 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
 at com.google.api.gax.retrying.DirectRetryingExecutor.submit(DirectRetryingExecutor.java:105)
 at com.google.cloud.RetryHelper.run(RetryHelper.java:76)
 at com.google.cloud.RetryHelper.runWithRetries(RetryHelper.java:50)
 at com.google.cloud.storage.BlobWriteChannel.flushBuffer(BlobWriteChannel.java:44)
 at com.google.cloud.BaseWriteChannel.close(BaseWriteChannel.java:151)

P.S: I see a similar issue #3586 which was closed. The reason for me to open this one is to understand my options as a user of the SDK. This would be useful for anyone referencing this issue in the future.
I already have a question for this on SO but opened an issue here as did not get any response there.

@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Jul 9, 2019
@sduskis sduskis added api: storage Issues related to the Cloud Storage API. type: question Request for information or clarification. Not an issue. and removed triage me I really want to be triaged. labels Jul 9, 2019
@yoshi-automation yoshi-automation added triage me I really want to be triaged. and removed triage me I really want to be triaged. labels Jul 9, 2019
@codyoss
Copy link
Member

codyoss commented Dec 3, 2019

This issue is now being tracked here: https://issuetracker.google.com/137168102

Please respond with any further updates at the link above.

@codyoss codyoss closed this as completed Dec 3, 2019
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. type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

5 participants