Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
afdef61
Add GCPFallback support
kinsaurralde Dec 29, 2025
d317412
formatting
kinsaurralde Dec 29, 2025
02a1bb1
fix imports
kinsaurralde Jan 5, 2026
83ea935
Merge branch 'googleapis:main' into eef
kinsaurralde Jan 5, 2026
9eed709
Add fallback test to GapicSpannerRpcTest
kinsaurralde Jan 6, 2026
bd64b27
respond to comments
kinsaurralde Jan 8, 2026
ca5b5b6
fixes
kinsaurralde Jan 9, 2026
1140d7d
Merge branch 'googleapis:main' into eef
kinsaurralde Jan 9, 2026
bd2c2e5
Merge branch 'main' into eef
rahul2393 Jan 16, 2026
0350d8f
add minFailedCalls parameter to createFallbackChannelOptions
kinsaurralde Jan 16, 2026
cfc8169
Merge branch 'eef' of github.com:kinsaurralde/java-spanner into eef
kinsaurralde Jan 16, 2026
81655ed
limit collected eef metrics
kinsaurralde Jan 20, 2026
98562f9
Merge branch 'main' into eef
kinsaurralde Jan 20, 2026
0659726
Merge branch 'eef' of github.com:kinsaurralde/java-spanner into eef
kinsaurralde Jan 20, 2026
8fc77e7
Merge branch 'main' into eef
kinsaurralde Feb 2, 2026
6539620
fix test
kinsaurralde Feb 3, 2026
2b5b889
remove unintentional changes
kinsaurralde Feb 3, 2026
f811a2b
formatting fix
kinsaurralde Feb 3, 2026
fbef34d
Merge branch 'main' into eef
kinsaurralde Feb 3, 2026
66b9315
formatting fixes
kinsaurralde Feb 3, 2026
a26d6b5
Merge branch 'eef' of github.com:kinsaurralde/java-spanner into eef
kinsaurralde Feb 3, 2026
66534c9
formatting fixes
kinsaurralde Feb 3, 2026
d8fcc4a
Merge branch 'main' into eef
kinsaurralde Feb 5, 2026
06760db
Merge branch 'main' into eef
rahul2393 Feb 7, 2026
29dac67
Merge branch 'main' into eef
kinsaurralde Feb 9, 2026
2bd6884
merge fixes
kinsaurralde Feb 10, 2026
70e5eb3
address comments
kinsaurralde Feb 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ public static GcpChannelPoolOptions createDefaultDynamicChannelPoolOptions() {
private final String compressorName;
private final boolean leaderAwareRoutingEnabled;
private final boolean enableDirectAccess;
private final boolean enableGcpFallback;
private final DirectedReadOptions directedReadOptions;
private final boolean useVirtualThreads;
private final OpenTelemetry openTelemetry;
Expand Down Expand Up @@ -918,6 +919,7 @@ protected SpannerOptions(Builder builder) {
compressorName = builder.compressorName;
leaderAwareRoutingEnabled = builder.leaderAwareRoutingEnabled;
enableDirectAccess = builder.enableDirectAccess;
enableGcpFallback = builder.enableGcpFallback;
directedReadOptions = builder.directedReadOptions;
useVirtualThreads = builder.useVirtualThreads;
openTelemetry = builder.openTelemetry;
Expand Down Expand Up @@ -980,6 +982,10 @@ default boolean isEnableDirectAccess() {
return false;
}

default boolean isEnableGcpFallback() {
return false;
}

default boolean isEnableBuiltInMetrics() {
return true;
}
Expand Down Expand Up @@ -1029,6 +1035,8 @@ private static class SpannerEnvironmentImpl implements SpannerEnvironment {
private static final String SPANNER_ENABLE_API_TRACING = "SPANNER_ENABLE_API_TRACING";
private static final String GOOGLE_SPANNER_ENABLE_DIRECT_ACCESS =
"GOOGLE_SPANNER_ENABLE_DIRECT_ACCESS";
private static final String GOOGLE_SPANNER_ENABLE_GCP_FALLBACK =
"GOOGLE_SPANNER_ENABLE_GCP_FALLBACK";
private static final String SPANNER_ENABLE_END_TO_END_TRACING =
"SPANNER_ENABLE_END_TO_END_TRACING";
private static final String SPANNER_DISABLE_BUILTIN_METRICS = "SPANNER_DISABLE_BUILTIN_METRICS";
Expand Down Expand Up @@ -1068,6 +1076,11 @@ public boolean isEnableDirectAccess() {
return Boolean.parseBoolean(System.getenv(GOOGLE_SPANNER_ENABLE_DIRECT_ACCESS));
}

@Override
public boolean isEnableGcpFallback() {
return Boolean.parseBoolean(System.getenv(GOOGLE_SPANNER_ENABLE_GCP_FALLBACK));
}

@Override
public boolean isEnableBuiltInMetrics() {
return !Boolean.parseBoolean(System.getenv(SPANNER_DISABLE_BUILTIN_METRICS));
Expand Down Expand Up @@ -1169,6 +1182,7 @@ public static class Builder
private String emulatorHost = System.getenv("SPANNER_EMULATOR_HOST");
private boolean leaderAwareRoutingEnabled = true;
private boolean enableDirectAccess = SpannerOptions.environment.isEnableDirectAccess();
private boolean enableGcpFallback = SpannerOptions.environment.isEnableGcpFallback();
private DirectedReadOptions directedReadOptions;
private boolean useVirtualThreads = false;
private OpenTelemetry openTelemetry;
Expand Down Expand Up @@ -1278,6 +1292,7 @@ protected Builder() {
this.channelConfigurator = options.channelConfigurator;
this.interceptorProvider = options.interceptorProvider;
this.enableDirectAccess = options.enableDirectAccess;
this.enableGcpFallback = options.enableGcpFallback;
this.directedReadOptions = options.directedReadOptions;
this.useVirtualThreads = options.useVirtualThreads;
this.enableApiTracing = options.enableApiTracing;
Expand Down Expand Up @@ -2338,6 +2353,10 @@ public Boolean isEnableDirectAccess() {
return enableDirectAccess;
}

public Boolean isEnableGcpFallback() {
return enableGcpFallback;
}

@ObsoleteApi("Use isEnableDirectAccess() instead")
@Deprecated
public boolean isAttemptDirectPath() {
Expand Down
Loading
Loading