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

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

Merged
merged 2 commits into from Oct 3, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 13 additions & 1 deletion bigquery/storage/managedwriter/doc.go
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