Skip to content
This repository was archived by the owner on Apr 7, 2026. It is now read-only.

Commit ca5b5b6

Browse files
committed
fixes
1 parent bd64b27 commit ca5b5b6

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/GapicSpannerRpc.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,9 @@ && isEnableGcpFallbackEnv()) {
373373
final AtomicReference<ManagedChannelBuilder> cloudPathBuilderRef = new AtomicReference<>();
374374
cloudPathProviderBuilder.setChannelConfigurator(
375375
builder -> {
376+
if (options.getChannelConfigurator() != null) {
377+
builder = options.getChannelConfigurator().apply(builder);
378+
}
376379
cloudPathBuilderRef.set(builder);
377380
return builder;
378381
});
@@ -409,8 +412,12 @@ public <ReqT, RespT> ClientCall<ReqT, RespT> interceptCall(
409412

410413
defaultChannelProviderBuilder.setChannelConfigurator(
411414
directPathBuilder -> {
415+
if (options.getChannelConfigurator() != null) {
416+
directPathBuilder = options.getChannelConfigurator().apply(directPathBuilder);
417+
}
418+
412419
String jsonApiConfig = parseGrpcGcpApiConfig();
413-
GcpManagedChannelOptions gcpOptions = options.getGrpcGcpOptions();
420+
GcpManagedChannelOptions gcpOptions = grpcGcpOptionsWithMetricsAndDcp(options);
414421
if (gcpOptions == null) {
415422
gcpOptions = GcpManagedChannelOptions.newBuilder().build();
416423
}
@@ -610,6 +617,7 @@ GcpFallbackChannelOptions createFallbackChannelOptions(
610617
return GcpFallbackChannelOptions.newBuilder()
611618
.setPrimaryChannelName("directpath")
612619
.setFallbackChannelName("cloudpath")
620+
.setMinFailedCalls(1)
613621
.setGcpFallbackOpenTelemetry(fallbackTelemetry)
614622
.build();
615623
}

0 commit comments

Comments
 (0)