From 40035bdda49149bdfc008b342ac72f1ce289f0fb Mon Sep 17 00:00:00 2001 From: Hailong Wen Date: Wed, 17 Apr 2024 19:30:02 +0000 Subject: [PATCH] Set EnableDirectPath to when DP is turned on for Spanner. This is to counter https://github.com/googleapis/google-cloud-go/pull/9186. Previously `EnableDirectPath` is default to true. With the removal we need to explicitly set it. --- spanner/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spanner/client.go b/spanner/client.go index 42e0087681a5..a8c190e11e6f 100644 --- a/spanner/client.go +++ b/spanner/client.go @@ -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(