Skip to content

Google Cloud Storage - java sdk - retrySettings does not recover network errors #26

Closed
@Eliyahu-Machluf

Description

@Eliyahu-Machluf

I'm trying to configure my 'google cloud storage' client to use internal retries.
I added configuration for retrySettings like this:

    RetrySettings retrySettings = RetrySettings
            .newBuilder()
            .setMaxAttempts(50)
            .setInitialRetryDelay(Duration.ofSeconds(10))
            .setRetryDelayMultiplier(1.5)
            .setMaxRetryDelay(Duration.ofSeconds(20))
            .build();
    storage = StorageOptions.newBuilder().setRetrySettings(retrySettings).setCredentials(credentials).build().getService();
....

I then tried to upload a 500MB file, and during the upload process, disconnect the network.
I expected the upload to be retried for at least 10 minutes, however I got an error almost immediately.

I have some questions:

  1. Am I missing something? Does the code above look OK?
  2. Is there a way to turn on debug information for the java client, so I can see at log file what occur?
  3. I did not find an appropriate java tutorials for google cloud storage java SDK, only some code samples. Is there a good tutorial for the java SDK?

Metadata

Metadata

Assignees

Labels

api: storageIssues related to the googleapis/java-storage API.type: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions