@@ -96,11 +96,6 @@ public class EnhancedBigtableStubSettings extends StubSettings<EnhancedBigtableS
9696 // The largest message that can be received is a 256 MB ReadRowsResponse.
9797 private static final int MAX_MESSAGE_SIZE = 256 * 1024 * 1024 ;
9898 private static final String SERVER_DEFAULT_APP_PROFILE_ID = "" ;
99-
100- // TODO(meeral-k): add documentation
101- private static final boolean DIRECT_PATH_ENABLED =
102- Boolean .parseBoolean (System .getenv ("CBT_ENABLE_DIRECTPATH" ));
103-
10499 // If true, disable the bound-token-by-default feature for DirectPath.
105100 private static final boolean DIRECT_PATH_BOUND_TOKEN_DISABLED =
106101 Boolean .parseBoolean (System .getenv ("CBT_DISABLE_DIRECTPATH_BOUND_TOKEN" ));
@@ -270,24 +265,7 @@ private static InstantiatingGrpcChannelProvider.Builder commonTraits(
270265
271266 /** Returns a builder for the default ChannelProvider for this service. */
272267 public static InstantiatingGrpcChannelProvider .Builder defaultGrpcTransportProviderBuilder () {
273- InstantiatingGrpcChannelProvider .Builder grpcTransportProviderBuilder =
274- BigtableStubSettings .defaultGrpcTransportProviderBuilder ();
275- if (DIRECT_PATH_ENABLED ) {
276- // Attempts direct access to CBT service over gRPC to improve throughput,
277- // whether the attempt is allowed is totally controlled by service owner.
278- grpcTransportProviderBuilder
279- .setAttemptDirectPathXds ()
280- .setAttemptDirectPath (true )
281- // Allow using non-default service account in DirectPath.
282- .setAllowNonDefaultServiceAccount (true );
283- if (!DIRECT_PATH_BOUND_TOKEN_DISABLED ) {
284- // Try to fetch a hard-bound access token for direct access if the runtime
285- // environment supports it.
286- grpcTransportProviderBuilder .setAllowHardBoundTokenTypes (
287- Collections .singletonList (InstantiatingGrpcChannelProvider .HardBoundTokenTypes .ALTS ));
288- }
289- }
290- return commonTraits (grpcTransportProviderBuilder );
268+ return commonTraits (BigtableStubSettings .defaultGrpcTransportProviderBuilder ());
291269 }
292270
293271 /** Applies Direct Access traits (DirectPath & ALTS) to an existing builder. */
@@ -624,12 +602,9 @@ public static class Builder extends StubSettings.Builder<EnhancedBigtableStubSet
624602 */
625603 private Builder () {
626604 // 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.
605+ // Only runs Direct Access Checker if user explicitly sets CBT_ENABLE_DIRECTPATH=true
630606 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
607+ // Once we release DirectPath, this will be default to true unless CBT_ENABLE_DIRECTPATH=false
633608 // this.enableDirectPathByDefault =
634609 // !"false".equalsIgnoreCase(System.getenv("CBT_ENABLE_DIRECTPATH"));
635610 this .appProfileId = SERVER_DEFAULT_APP_PROFILE_ID ;
0 commit comments