Skip to content

Commit

Permalink
fix: set EnableDirectPath to when DP is turned on for Spanner. (#9790)
Browse files Browse the repository at this point in the history
This is broken by #9186.
We need to explicitly set `EnableDirectPath` to true.
  • Loading branch information
HailongWen authored Apr 20, 2024
1 parent a75e55d commit c22943d
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 @@ -354,7 +354,7 @@ func allClientOpts(numChannels int, compression string, userOpts ...option.Clien
internaloption.AllowNonDefaultServiceAccount(true),
}
if enableDirectPathXds, _ := strconv.ParseBool(os.Getenv("GOOGLE_SPANNER_ENABLE_DIRECT_ACCESS")); enableDirectPathXds {
clientDefaultOpts = append(clientDefaultOpts, internaloption.EnableDirectPathXds())
clientDefaultOpts = append(clientDefaultOpts, internaloption.EnableDirectPath(true), internaloption.EnableDirectPathXds())
}
if compression == "gzip" {
userOpts = append(userOpts, option.WithGRPCDialOption(grpc.WithDefaultCallOptions(
Expand Down

0 comments on commit c22943d

Please sign in to comment.