Skip to content

Commit 81e52e5

Browse files
authored
docs(bigquery/storage/managedwriter): add retry info to package docs (#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.
1 parent 4c32b13 commit 81e52e5

File tree

1 file changed

+13
-1
lines changed
  • bigquery/storage/managedwriter

1 file changed

+13
-1
lines changed

‎bigquery/storage/managedwriter/doc.go

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ have been finalized, meaning they'll no longer allow further data writes.
171171
// table atomically.
172172
resp, err := client.BatchCommitWriteStreams(ctx, req)
173173
174-
# Error Handling
174+
# Error Handling and Automatic Retries
175175
176176
Like other Google Cloud services, this API relies on common components that can provide an
177177
enhanced set of errors when communicating about the results of API interactions.
@@ -199,5 +199,17 @@ An example of accessing the structured error details:
199199
}
200200
}
201201
}
202+
203+
This library supports the ability to retry failed append requests, but this functionality is not
204+
enabled by default. You can enable it via the EnableWriteRetries option when constructing a new
205+
managed stream. Use of automatic retries can impact correctness when attempting certain exactly-once
206+
write patterns, but is generally recommended for workloads that only need at-least-once writing.
207+
208+
With write retries enabled, failed writes will be automatically attempted a finite number of times
209+
(currently 4) if the failure is considered retriable.
210+
211+
In support of the retry changes, the AppendResult returned as part of an append call now includes
212+
TotalAttempts(), which returns the number of times that specific append was enqueued to the service.
213+
Values larger than 1 are indicative of a specific append being enqueued multiple times.
202214
*/
203215
package managedwriter

0 commit comments

Comments
 (0)