nielm commented on code in PR #34601: URL: https://github.com/apache/beam/pull/34601#discussion_r2037977531
########## sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/spanner/SpannerAccessor.java: ########## @@ -218,13 +218,7 @@ static SpannerOptions buildSpannerOptions(SpannerConfig spannerConfig) { if (serviceFactory != null) { builder.setServiceFactory(serviceFactory); } - ValueProvider<String> host = spannerConfig.getHost(); - if (host != null) { - String hostValue = host.get(); - if (hostValue != null && !hostValue.trim().isEmpty()) { - builder.setHost(host.get()); - } - } + builder.setHost(spannerConfig.getHostValue()); Review Comment: If SpannerIO does not set the host in `SpannerOptions`, then the default host set in the Spanner client library is used, which is `https://spanner.googleapis.com`. The endpoint that should be used by default by Beam is `http://batch-spanner.googlapis.com`. I believe that this labels the traffic as batch traffic. If the `host` in SpannerIO is not set, then the default endpoint used by Beam is `http://batch-spanner.googlapis.com`. It was effectively a bug in Beam that setting a the SpannerIO `host` to null would use the default host from the client library, instead of the SpannerIO default host. Yes. this is effectively a change in behavior, and is commented as such in #34600. -- 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: github-unsubscr...@beam.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org