Skip to content

Commit a0251e1

Browse files
tritoneBrennaEpp
authored andcommitted
doc(storage): edits to retry package docs (googleapis#5312)
Following up on some suggestions from googleapis#5300
1 parent ced556f commit a0251e1

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

storage/doc.go

+11-11
Original file line numberDiff line numberDiff line change
@@ -253,18 +253,18 @@ See https://pkg.go.dev/google.golang.org/api/googleapi#Error for more informatio
253253
254254
Retrying failed requests
255255
256-
Methods of this package may use exponential backoff to retry calls
257-
that fail with transient errors. Retrying continues indefinitely unless the
258-
controlling context is canceled, the client is closed, or a non-transient error
259-
is received. See context.WithTimeout and context.WithCancel.
260-
261-
Retry strategy in this library follows best practices for Cloud Storage. By
262-
default, only idempotent operations are retried, exponential backoff with jitter
263-
is employed, and only transient network errors and response codes defined as
264-
transient by the service and will be retried. See
256+
Methods in this package may retry calls that fail with transient errors.
257+
Retrying continues indefinitely unless the controlling context is canceled, the
258+
client is closed, or a non-transient error is received. To stop retries from
259+
continuing, use context timeouts or cancellation.
260+
261+
The retry strategy in this library follows best practices for Cloud Storage. By
262+
default, operations are retried only if they are idempotent, and exponential
263+
backoff with jitter is employed. In addition, errors are only retried if they
264+
are defined as transient by the service. See
265265
https://cloud.google.com/storage/docs/retry-strategy for more information.
266266
267-
Users can configure non-default retry behavior for a particular operation (using
267+
Users can configure non-default retry behavior for a single library call (using
268268
BucketHandle.Retryer and ObjectHandle.Retryer) or for all calls made by a
269269
client (using Client.SetRetry). For example:
270270
@@ -278,7 +278,7 @@ client (using Client.SetRetry). For example:
278278
storage.WithPolicy(storage.RetryAlways),
279279
)
280280
281-
// Use context timeouts to set an overall deadline on the call, including all
281+
// Use a context timeout to set an overall deadline on the call, including all
282282
// potential retries.
283283
ctx, cancel := context.WithTimeout(ctx, 5*time.Second)
284284
defer cancel()

0 commit comments

Comments
 (0)