Skip to content

Commit

Permalink
feat(bigtable/spanner): remove grpclb (#9186)
Browse files Browse the repository at this point in the history
Co-authored-by: Cody Oss <6331106+codyoss@users.noreply.github.com>
Co-authored-by: Baha Aiman <bahaaiman@google.com>
  • Loading branch information
3 people committed Apr 16, 2024
1 parent c2df09c commit 480f9a0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
4 changes: 1 addition & 3 deletions bigtable/bigtable.go
Original file line number Diff line number Diff line change
Expand Up @@ -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...)
Expand Down
1 change: 0 additions & 1 deletion spanner/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 480f9a0

Please sign in to comment.