Closed psinghbay1 closed 1 year ago
@rajatbhatta Hi, I'm curious to know when this can be part of the development work. I'm happy to test out the fixes if needed. thanks
Hi @psinghbay1: This looks like more of an enhancement in the Spring data library. Can you please log an issue there? Thanks!
Closing this. Feel free to re-open if there's anything we can help with.
Environment details
Steps to reproduce
Code example
The Spring Data for Spanner comes up with a handy util called ‘Context’ which could be used to supply configurations for the given call context.
Flaky Version
The above maintains the new Timeout context only at spannerTemplate.executeQuery() and not after this. Given the Spanner client internally uses Streaming (
ExecuteStreamingSql
), it doesn’t call Spanner backend until rs.next() is invoked. So wrapping rs.next() in the context.call() ensures that the right context is maintained and passed along.Working Version
Above code passes the timeout to context’s (GrpcCallContext) streaming fields
Instead of Call option’s deadline:
This happens due to SpannerCallContextTimeoutConfigurator doesn’t set callOption.
If we ensure that SpannerCallContextTimeoutConfigurator populates callOption, then GrpcCallContext.merge() will copy It to final context and pass along the deadline.
The context.call() changes the Streaming Wait & Idle timeouts for the given call.
Stack trace
Its a regular timeout case and the application has normal timeout error message.
External references such as API reference guides
Any additional information below
Spring Data for Spanner should ensure that SpannerCallContextTimeoutConfigurator sets callOption.
I'm exploring short term and long term solution to propagating the timeouts to the lower layer.
Thanks! Praveendra Singh