Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gax : GrpcSpannerStub create(ClientContext clientContext) not using SpannerStubSettings configuration #3360

Open
surbhigarg92 opened this issue Nov 11, 2024 · 0 comments
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@surbhigarg92
Copy link
Contributor

Regarding the bug fix for canUseDirectPath returning false when DirectPath is enabled, the recommendation was to pass clientContext in the GrpcSpannerStub.create instead of SpannerStubSetting

This approach works for standard requests, but it fails in cases where custom timeouts are applied.

Further investigation showed that passing clientContext to GrpcSpannerStub.create results in a new SpannerStubSettings.newBuilder().build() instance being created rather than using the SpannerStubSettings from clientContext . See code reference.

Using the protected constructor that accepts both stubSettings and clientContext directly resolves the issue. Refer PR

Expected fix:
Expose a new public static method for accepting both stubSettings and clientContext

@zhumin8 zhumin8 added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

2 participants