Skip to content

Commit

Permalink
feat(spanner): make leader aware routing default enabled for supporte…
Browse files Browse the repository at this point in the history
…d RPC requests. (#7912)
  • Loading branch information
rahul2393 authored May 12, 2023
1 parent 151908a commit d0d3755
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spanner/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d0d3755

Please sign in to comment.