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

Commit 209b606

Browse files
committed
fix
1 parent 04ea584 commit 209b606

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettings.java

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,15 @@ public static class Builder extends StubSettings.Builder<EnhancedBigtableStubSet
623623
* in the underlying GAPIC client for batching).
624624
*/
625625
private Builder() {
626+
// TODO(enable this by default)
627+
// Default is false until release.
628+
// Only runs check if user explicitly sets CBT_ENABLE_DIRECTPATH=true
629+
// We will run the direct access checker even if CBT_ENABLE_DIRECTPATH=true.
630+
this.enableDirectPathByDefault = Boolean.parseBoolean(System.getenv("CBT_ENABLE_DIRECTPATH"));
631+
// Once we release, this will be
632+
// Only skips check if user explicitly sets CBT_ENABLE_DIRECTPATH=false
633+
// this.enableDirectPathByDefault =
634+
// !"false".equalsIgnoreCase(System.getenv("CBT_ENABLE_DIRECTPATH"));
626635
this.appProfileId = SERVER_DEFAULT_APP_PROFILE_ID;
627636
this.isRefreshingChannel = true;
628637
setCredentialsProvider(defaultCredentialsProviderBuilder().build());
@@ -650,8 +659,8 @@ private Builder() {
650659
FeatureFlags.newBuilder()
651660
.setReverseScans(true)
652661
.setLastScannedRowResponses(true)
653-
.setDirectAccessRequested(DIRECT_PATH_ENABLED || enableDirectPathByDefault)
654-
.setTrafficDirectorEnabled(DIRECT_PATH_ENABLED || enableDirectPathByDefault)
662+
.setDirectAccessRequested(enableDirectPathByDefault)
663+
.setTrafficDirectorEnabled(enableDirectPathByDefault)
655664
.setPeerInfo(true);
656665
}
657666

google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/grpc/BigtableTransportChannelProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ public TransportChannelProvider withPoolSize(int size) {
173173
directPathCompatibleTracer,
174174
enableDirectAccessChecker);
175175
}
176-
176+
177177
/** Expected to only be called once when BigtableClientContext is created */
178178
@Override
179179
public TransportChannel getTransportChannel() throws IOException {

0 commit comments

Comments
 (0)