-
Notifications
You must be signed in to change notification settings - Fork 48
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
RequestTimeout is not respected when API is called with context #46
Comments
Are you setting timeouts in the context that's passed to DAX SDK? If you are explicitly passing in a context, it should look like below if you want to configure 50 ms timeout:
When context is passed to the SDK, we will honour the timeout that's set in the context and will not consider the That's why in the below code, the request timeout is overridden if context is provided - Line 163 in 264dfde
I executed couple of tests to validate this behaviour and it works as expected:
|
We did not set the timeout in the context that we passed into the QueryWithContext request. When we call the API, we do something like
There was nothing in the documentation to suggest that Config's RequestTimeout (i.e., Line 49 in 264dfde
|
Why have the Perhaps I may suggest that |
Thank you for the feedback! We'll update the documentation in the next release to call out that the top-level configs are not honoured if the context is set.
That's a good suggestion but unfortunately if we make that change now, the change will be backwards incompatible. |
@anudeeb looking forward to |
We have set the RequestTimeout to 75ms in our DAX client. However, when TCP connection is re-establshed, we still see some DAX request in the 6s range (which based on our discussion with AWS team are caused by connection being re-established).
Looking at the Go SDK, it appears that the issue is due to SDK not respecting the request timeout if it is called with context.
See
aws-dax-go/dax/service.go
Line 163 in 264dfde
Please note that we use QueryWithContext as per https://pkg.go.dev/github.com/zabawaba99/aws-dax-go/dax#Dax.QueryWithContext.
The text was updated successfully, but these errors were encountered: