nielm commented on code in PR #26727:
URL: https://github.com/apache/beam/pull/26727#discussion_r1196082110


##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/spanner/SpannerAccessor.java:
##########
@@ -113,6 +113,8 @@ private static SpannerAccessor 
createAndConnect(SpannerConfig spannerConfig) {
     SpannerOptions.Builder builder = SpannerOptions.newBuilder();
 
     Set<Code> retryableCodes = new HashSet<>();
+    // Add default retryable codes
+    retryableCodes.add(Code.UNAVAILABLE);

Review Comment:
   Could there be a scenario where a user does not want to retry on UNAVAILABLE?
   
   This code would always add UNAVAILABLE even if the user specified their own 
set of retryable codes, and could therefore lead to unexpected behaviour..



##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/spanner/SpannerAccessor.java:
##########
@@ -113,6 +113,8 @@ private static SpannerAccessor 
createAndConnect(SpannerConfig spannerConfig) {
     SpannerOptions.Builder builder = SpannerOptions.newBuilder();
 
     Set<Code> retryableCodes = new HashSet<>();
+    // Add default retryable codes
+    retryableCodes.add(Code.UNAVAILABLE);

Review Comment:
   Resolved by other changes.
   
   Lgtm



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to