Skip to content

Commit

Permalink
docs(bigquery/storage/managedwriter): add retry info to package docs (#…
Browse files Browse the repository at this point in the history
…6803)

* docs(bigquery/storage/managedwriter): add retry info to package docs

This PR adds additional guidance around retry to the error section
of the package docs.
  • Loading branch information
shollyman authored Oct 3, 2022
1 parent 4c32b13 commit 81e52e5
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion bigquery/storage/managedwriter/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ have been finalized, meaning they'll no longer allow further data writes.
// table atomically.
resp, err := client.BatchCommitWriteStreams(ctx, req)
# Error Handling
# Error Handling and Automatic Retries
Like other Google Cloud services, this API relies on common components that can provide an
enhanced set of errors when communicating about the results of API interactions.
Expand Down Expand Up @@ -199,5 +199,17 @@ An example of accessing the structured error details:
}
}
}
This library supports the ability to retry failed append requests, but this functionality is not
enabled by default. You can enable it via the EnableWriteRetries option when constructing a new
managed stream. Use of automatic retries can impact correctness when attempting certain exactly-once
write patterns, but is generally recommended for workloads that only need at-least-once writing.
With write retries enabled, failed writes will be automatically attempted a finite number of times
(currently 4) if the failure is considered retriable.
In support of the retry changes, the AppendResult returned as part of an append call now includes
TotalAttempts(), which returns the number of times that specific append was enqueued to the service.
Values larger than 1 are indicative of a specific append being enqueued multiple times.
*/
package managedwriter

0 comments on commit 81e52e5

Please sign in to comment.