From d0d37550911f37e09ea9204d0648fb64ff3204ff Mon Sep 17 00:00:00 2001 From: rahul2393 Date: Fri, 12 May 2023 12:18:45 +0530 Subject: [PATCH] feat(spanner): make leader aware routing default enabled for supported RPC requests. (#7912) --- spanner/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spanner/client.go b/spanner/client.go index cb1a11b9a6f7..fb3b13ab9ee2 100644 --- a/spanner/client.go +++ b/spanner/client.go @@ -178,7 +178,7 @@ func contextWithOutgoingMetadata(ctx context.Context, md metadata.MD, disableRou // form projects/PROJECT_ID/instances/INSTANCE_ID/databases/DATABASE_ID. It uses // a default configuration. func NewClient(ctx context.Context, database string, opts ...option.ClientOption) (*Client, error) { - return NewClientWithConfig(ctx, database, ClientConfig{SessionPoolConfig: DefaultSessionPoolConfig, DisableRouteToLeader: true}, opts...) + return NewClientWithConfig(ctx, database, ClientConfig{SessionPoolConfig: DefaultSessionPoolConfig, DisableRouteToLeader: false}, opts...) } // NewClientWithConfig creates a client to a database. A valid database name has