Skip to content

Commit

Permalink
feat: add more retry error code to the sample (#1805)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
yirutang and gcf-owl-bot[bot] committed Sep 28, 2022
1 parent 1a69192 commit 4bf67bc
Showing 1 changed file with 8 additions and 2 deletions.
Expand Up @@ -94,9 +94,15 @@ private static class AppendContext {

private static class DataWriter {

private static final int MAX_RETRY_COUNT = 2;
private static final int MAX_RETRY_COUNT = 3;
private static final ImmutableList<Code> RETRIABLE_ERROR_CODES =
ImmutableList.of(Code.INTERNAL, Code.ABORTED, Code.CANCELLED);
ImmutableList.of(
Code.INTERNAL,
Code.ABORTED,
Code.CANCELLED,
Code.FAILED_PRECONDITION,
Code.DEADLINE_EXCEEDED,
Code.UNAVAILABLE);

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

0 comments on commit 4bf67bc

Please sign in to comment.