zoercai commented on a change in pull request #16846:
URL: https://github.com/apache/beam/pull/16846#discussion_r806452368
##########
File path:
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/spanner/SpannerAccessor.java
##########
@@ -107,34 +108,56 @@ public static SpannerAccessor getOrCreate(SpannerConfig
spannerConfig) {
private static SpannerAccessor createAndConnect(SpannerConfig spannerConfig)
{
SpannerOptions.Builder builder = SpannerOptions.newBuilder();
- ValueProvider<Duration> commitDeadline = spannerConfig.getCommitDeadline();
- if (commitDeadline != null && commitDeadline.get().getMillis() > 0) {
+ // Set retryable codes
+ if (spannerConfig.getRetryableCodes() != null) {
Review comment:
I actually started this work from trying to put in `SpannerStubSettings`
rather than the separate `retryableCodes` and `retrySettings` currently here,
but `SpannerStubSettings` is not serialisable and I couldn't get it to work
after trying for hours.
I have changed this part so that the retryable codes get applied to all API
methods rather than just the commit and executeStreamingSql though. Let me know
if that doesn't work :)
--
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]