Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update GrpcStorageOptions to attempt direct path by default #2715

Merged
merged 2 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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 @@ -697,7 +697,7 @@ public Duration getTerminationAwaitDuration() {
/** @since 2.14.0 This new api is in preview and is subject to breaking changes. */
@BetaApi
public boolean isAttemptDirectPath() {
return false;
return true;
}

/** @since 2.41.0 This new api is in preview and is subject to breaking changes. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ static FakeServer of(StorageGrpc.StorageImplBase service) throws IOException {
.setCredentials(NoCredentials.getInstance())
.setGrpcInterceptorProvider(GrpcPlainRequestLoggingInterceptor.getInterceptorProvider())
.setEnableGrpcClientMetrics(false)
.setAttemptDirectPath(false)
.build();
return new FakeServer(server, grpcStorageOptions);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public void grpc() throws Exception {
.setCredentials(NoCredentials.getInstance())
.setProjectId("test-project-id")
.setEnableGrpcClientMetrics(false)
.setAttemptDirectPath(false)
.build();

Storage service1 = options.getService();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ private Storage newStorage(boolean forTest) {
builder =
StorageOptions.grpc()
.setHost(testBench.getGRPCBaseUri())
.setEnableGrpcClientMetrics(false);
.setEnableGrpcClientMetrics(false)
.setAttemptDirectPath(false);
break;
default:
throw new IllegalStateException(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ public void setUp() throws Exception {
StorageOptions.grpc()
.setGrpcInterceptorProvider(() -> ImmutableList.of(requestAuditing))
.setEnableGrpcClientMetrics(false)
.setAttemptDirectPath(false)
.build()
.getService();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ static BackendResources of(Backend backend) {
.setGrpcInterceptorProvider(
GrpcPlainRequestLoggingInterceptor.getInterceptorProvider())
.setEnableGrpcClientMetrics(false)
.setAttemptDirectPath(false)
.build();
return new StorageInstance(built, protectedBucketNames);
});
Expand Down
Loading