Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content
This repository was archived by the owner on Feb 24, 2026. It is now read-only.

Commit 4bf67bc

Browse files
feat: add more retry error code to the sample (#1805)
* feat: add more retry error code to the sample * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 1a69192 commit 4bf67bc

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

samples/snippets/src/main/java/com/example/bigquerystorage/WriteToDefaultStream.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,15 @@ private static class AppendContext {
9494

9595
private static class DataWriter {
9696

97-
private static final int MAX_RETRY_COUNT = 2;
97+
private static final int MAX_RETRY_COUNT = 3;
9898
private static final ImmutableList<Code> RETRIABLE_ERROR_CODES =
99-
ImmutableList.of(Code.INTERNAL, Code.ABORTED, Code.CANCELLED);
99+
ImmutableList.of(
100+
Code.INTERNAL,
101+
Code.ABORTED,
102+
Code.CANCELLED,
103+
Code.FAILED_PRECONDITION,
104+
Code.DEADLINE_EXCEEDED,
105+
Code.UNAVAILABLE);
100106

101107
// Track the number of in-flight requests to wait for all responses before shutting down.
102108
private final Phaser inflightRequestCount = new Phaser(1);

0 commit comments

Comments
 (0)