From 54a18402d24f8d8edd89a7496139fa1a0c309a69 Mon Sep 17 00:00:00 2001 From: Seth Hollyman Date: Mon, 3 Oct 2022 18:46:40 +0000 Subject: [PATCH 1/2] 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. --- bigquery/storage/managedwriter/doc.go | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/bigquery/storage/managedwriter/doc.go b/bigquery/storage/managedwriter/doc.go index a81ff5df079..a948aa2e287 100644 --- a/bigquery/storage/managedwriter/doc.go +++ b/bigquery/storage/managedwriter/doc.go @@ -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. @@ -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 retried 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 From 33219e216ec4edc195a96391d6498d61e1a045a8 Mon Sep 17 00:00:00 2001 From: Seth Hollyman Date: Mon, 3 Oct 2022 18:58:09 +0000 Subject: [PATCH 2/2] wordings --- bigquery/storage/managedwriter/doc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bigquery/storage/managedwriter/doc.go b/bigquery/storage/managedwriter/doc.go index a948aa2e287..4754a5ff8d0 100644 --- a/bigquery/storage/managedwriter/doc.go +++ b/bigquery/storage/managedwriter/doc.go @@ -205,7 +205,7 @@ enabled by default. You can enable it via the EnableWriteRetries option when co 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 retried a finite number of times +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