Open
Description
When creating/connecting a Spanner client, there's potentially 2 blocking operations required:
- Creating/connecting? creds
ChannelCredentials::google_default_credentials()
- Creating/connecting? a grpc Channel/client
ChannelBuilder::secure_connect
One of these is likely a potentially blocking operation, probably 1. as grpc's docs show C#'s google_default_credentials()
equivalent as async:
using Grpc.Auth; // from Grpc.Auth NuGet package
...
// Loads Google Application Default Credentials with publicly trusted roots.
var channelCredentials = await GoogleGrpcCredentials.GetApplicationDefaultAsync();
var channel = new Channel("greeter.googleapis.com", channelCredentials);
var client = new Greeter.GreeterClient(channel);
...
The grpcio lib does not provide async versions of these methods. They may potentially be blocking our async SpannerConnection::connect
method, which could be problematic.
We should probably contact Google's grpc client team for advise here and followup with grpc-rs project.