From 57c1b91fae11bd7fa323db5d12d252f61f8cf8b9 Mon Sep 17 00:00:00 2001 From: Hailong Wen Date: Sat, 20 Apr 2024 08:09:34 -0700 Subject: [PATCH] fix: set EnableDirectPath to when DP is turned on for Spanner. (#9790) This is broken by https://github.com/googleapis/google-cloud-go/pull/9186. We need to explicitly set `EnableDirectPath` to true. --- client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client.go b/client.go index 42e0087..a8c190e 100644 --- a/client.go +++ b/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(