google-cloud-python icon indicating copy to clipboard operation
google-cloud-python copied to clipboard

No way to override default deadlines in Spanner API

Open vkedia opened this issue 9 years ago • 9 comments

Currently none of the Spanner APIs expose a way to override default deadline. This is especially important for read and query apis since people can use those APIs to stream millions of rows and the default deadline (which I think is 30 seconds) is just too small for those cases. One way of doing this would be to allow users to pass in gax CallOptions.

vkedia avatar Apr 03 '17 21:04 vkedia

We talked about this in the context of #3204, and decided that while this is something we want to do, there is some design work involved.

lukesneeringer avatar Apr 03 '17 22:04 lukesneeringer

So is there some ETA for this? Can we do something in the short term till we figure out a common solution for all the libraries. This seems important to me especially for long running streaming apis which would be the most widely used apis in Spanner.

vkedia avatar Apr 04 '17 16:04 vkedia

There is not an ETA right now. It is something we do want to do. I do not want to put a stopgap solution in Spanner only.

lukesneeringer avatar Apr 04 '17 19:04 lukesneeringer

@vkedia We have this ability on a per-method basis now. Which methods need longer timeouts?

lukesneeringer avatar Aug 11 '17 21:08 lukesneeringer

So do you mean users of spanner library can specify the deadline on a per method basis?

vkedia avatar Aug 11 '17 22:08 vkedia

@lukesneeringer So can this be closed since you can specify timeout_secs on run_in_transaction in session and apparently database (which passes the keyword into session)?

chemelnucfin avatar Dec 08 '17 21:12 chemelnucfin

If we need smarter defaults, we should change those. Users can also override them in the meantime.

lukesneeringer avatar Dec 18 '17 16:12 lukesneeringer

@lukesneeringer @chemelnucfin Can you give me some examples of how I would override the timeout for things like read/query/batch?

vkedia avatar Dec 18 '17 18:12 vkedia

Hello, feature requests will now be tracked in the project Feature Requests. I will close this issue now, please feel free to continue to address any issues/concerns here.

chemelnucfin avatar Jan 22 '18 21:01 chemelnucfin