gapic-generator-java icon indicating copy to clipboard operation
gapic-generator-java copied to clipboard

DirectPath Misconfiguration emitted for non-DirectPath client instances in a DirectPath enabled client application

Open mohanli-ml opened this issue 1 year ago • 1 comments

Environment details

  1. GCE
  2. gax 2.41.0
  3. GOOGLE_CLOUD_ENABLE_DIRECT_PATH_XDS is set

Details

In https://github.com/googleapis/sdk-platform-java/pull/2105 we added warning logs for DirectPath misconfiguration. The logic is that we first check if DirectPath xDS is enabled, then check if DirectPath is enabled. This could cause misleading warning logs in the case where non-DirectPath client instances in a DirectPath enabled client application. For example: a customer's application may contains a GCS client and a Bigquery client. The customer use setAttemptDirectPath to enable DirectPath in its GCS client, and set GOOGLE_CLOUD_ENABLE_DIRECT_PATH_XDS to enable DirectPath xDS. In this case, this warning log will be printed in the customer's Bigquery client.

mohanli-ml avatar Jan 26 '24 21:01 mohanli-ml

We should probably check if the client setting isDirectPathEnabled() is enabled first.

blakeli0 avatar Apr 16 '24 20:04 blakeli0