Skip to content

Commit d9b526a

Browse files
feat: add ResourceExhausted to retryable error for Write API unary calls (#2178)
* feat: add ResourceExhausted to retryable error for Write API unary calls docs: add multiplexing documentation PiperOrigin-RevId: 545839491 Source-Link: googleapis/googleapis@2b006af Source-Link: https://github.com/googleapis/googleapis-gen/commit/0d52d385bd4e78c7b2c83755013fe103e804c384 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMGQ1MmQzODViZDRlNzhjN2IyYzgzNzU1MDEzZmUxMDNlODA0YzM4NCJ9 * 🦉 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 afc550a commit d9b526a

File tree

13 files changed

+418
-171
lines changed

13 files changed

+418
-171
lines changed

google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/stub/BigQueryWriteStubSettings.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,9 @@ public static class Builder extends StubSettings.Builder<BigQueryWriteStubSettin
259259
"retry_policy_4_codes",
260260
ImmutableSet.copyOf(
261261
Lists.<StatusCode.Code>newArrayList(
262-
StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE)));
262+
StatusCode.Code.DEADLINE_EXCEEDED,
263+
StatusCode.Code.UNAVAILABLE,
264+
StatusCode.Code.RESOURCE_EXHAUSTED)));
263265
RETRYABLE_CODE_DEFINITIONS = definitions.build();
264266
}
265267

google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1/MockBigQueryWriteImpl.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,7 @@ public void batchCommitWriteStreams(
174174
responseObserver.onError(
175175
new IllegalArgumentException(
176176
String.format(
177-
"Unrecognized response type %s for method BatchCommitWriteStreams, expected %s or"
178-
+ " %s",
177+
"Unrecognized response type %s for method BatchCommitWriteStreams, expected %s or %s",
179178
response == null ? "null" : response.getClass().getName(),
180179
BatchCommitWriteStreamsResponse.class.getName(),
181180
Exception.class.getName())));

google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta1/MockBigQueryStorageImpl.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,7 @@ public void batchCreateReadSessionStreams(
117117
responseObserver.onError(
118118
new IllegalArgumentException(
119119
String.format(
120-
"Unrecognized response type %s for method BatchCreateReadSessionStreams, expected"
121-
+ " %s or %s",
120+
"Unrecognized response type %s for method BatchCreateReadSessionStreams, expected %s or %s",
122121
response == null ? "null" : response.getClass().getName(),
123122
Storage.BatchCreateReadSessionStreamsResponse.class.getName(),
124123
Exception.class.getName())));

google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta2/MockBigQueryWriteImpl.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,7 @@ public void batchCommitWriteStreams(
174174
responseObserver.onError(
175175
new IllegalArgumentException(
176176
String.format(
177-
"Unrecognized response type %s for method BatchCommitWriteStreams, expected %s or"
178-
+ " %s",
177+
"Unrecognized response type %s for method BatchCommitWriteStreams, expected %s or %s",
179178
response == null ? "null" : response.getClass().getName(),
180179
BatchCommitWriteStreamsResponse.class.getName(),
181180
Exception.class.getName())));

0 commit comments

Comments
 (0)