Skip to content

Commit

Permalink
fix: uses old version of gax-grpc method
Browse files Browse the repository at this point in the history
Internally, we are using version 1.47.1 of the gax-grpc library, which
does not provide a method currently being used (setExecutor).

In here we use a method that is available in 1.47.1 and achieves the
same goal (setExecutorProvider).
  • Loading branch information
thiagotnunes committed Sep 15, 2020
1 parent b312091 commit 94fd5bb
Showing 1 changed file with 5 additions and 2 deletions.
Expand Up @@ -60,7 +60,6 @@
import com.google.cloud.spanner.admin.instance.v1.stub.GrpcInstanceAdminStub;
import com.google.cloud.spanner.admin.instance.v1.stub.InstanceAdminStub;
import com.google.cloud.spanner.admin.instance.v1.stub.InstanceAdminStubSettings;
import com.google.cloud.spanner.spi.v1.SpannerRpc.Option;
import com.google.cloud.spanner.v1.stub.GrpcSpannerStub;
import com.google.cloud.spanner.v1.stub.SpannerStub;
import com.google.cloud.spanner.v1.stub.SpannerStubSettings;
Expand Down Expand Up @@ -317,7 +316,11 @@ public GapicSpannerRpc(final SpannerOptions options) {
.setMaxInboundMessageSize(MAX_MESSAGE_SIZE)
.setMaxInboundMetadataSize(MAX_METADATA_SIZE)
.setPoolSize(options.getNumChannels())
.setExecutor(executorProvider.getExecutor())

// Before updating this method to setExecutor, please make sure to verify the version
// of gax-grpc used internally. At the moment we are using 1.47.1, which does not
// support the setExecutor variant.
.setExecutorProvider(executorProvider)

// Set a keepalive time of 120 seconds to help long running
// commit GRPC calls succeed
Expand Down

0 comments on commit 94fd5bb

Please sign in to comment.