From 480f9a0ea8e159299dd3f909e2c0d8b5e771c580 Mon Sep 17 00:00:00 2001 From: Mohan Li <67390330+mohanli-ml@users.noreply.github.com> Date: Mon, 15 Apr 2024 21:34:03 -0700 Subject: [PATCH] feat(bigtable/spanner): remove grpclb (#9186) Co-authored-by: Cody Oss <6331106+codyoss@users.noreply.github.com> Co-authored-by: Baha Aiman --- bigtable/bigtable.go | 4 +--- spanner/client.go | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/bigtable/bigtable.go b/bigtable/bigtable.go index ef45d508268c..5dd4637767b6 100644 --- a/bigtable/bigtable.go +++ b/bigtable/bigtable.go @@ -85,9 +85,7 @@ func NewClientWithConfig(ctx context.Context, project, instance string, config C // Set the max size to correspond to server-side limits. option.WithGRPCDialOption(grpc.WithDefaultCallOptions(grpc.MaxCallSendMsgSize(1<<28), grpc.MaxCallRecvMsgSize(1<<28))), ) - // Attempts direct access to spanner service over gRPC to improve throughput, - // whether the attempt is allowed is totally controlled by service owner. - o = append(o, internaloption.EnableDirectPath(true)) + // Allow non-default service account in DirectPath. o = append(o, internaloption.AllowNonDefaultServiceAccount(true)) o = append(o, opts...) diff --git a/spanner/client.go b/spanner/client.go index fe87fafb1714..42e0087681a5 100644 --- a/spanner/client.go +++ b/spanner/client.go @@ -351,7 +351,6 @@ func allClientOpts(numChannels int, compression string, userOpts ...option.Clien clientDefaultOpts := []option.ClientOption{ option.WithGRPCConnectionPool(numChannels), option.WithUserAgent(fmt.Sprintf("spanner-go/v%s", internal.Version)), - internaloption.EnableDirectPath(true), internaloption.AllowNonDefaultServiceAccount(true), } if enableDirectPathXds, _ := strconv.ParseBool(os.Getenv("GOOGLE_SPANNER_ENABLE_DIRECT_ACCESS")); enableDirectPathXds {