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
Expose timeout query param for search requests #2748
Conversation
36239a0
to
bfba469
Compare
I haven't looked into the details yet, but I'd also prefer the former case returning HTTP 408 if we can keep backwards compatibility in a reasonable manner. We can potentially explore this in another PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! I haven't been able to actually test it jet but did want to post my review comments thus far.
I'll try to test tomorrow.
An update: Here's what I've tried:
In first scenario we are limited by the default max_timeout of "Timeout {}ms reached for uri: {}"
or
"Tonic status error: The operation was cancelled" In second scenario, we only get the second error. So what's happening? I propose to deal with that complexity in another PR, and we leave the constraint that, for remote shards, timeout will be the lowest of global or query param. My second proposal is to refactor to get rid of the custom layer of timeout of Lastly, to be able to actually extend the channel timeout we'd need to always create a new channel, which is not desired. So a solution would be to set it very high by default, and make sure we always set the cc @timvisee |
After some investigation from my end I came to the same conclusion. I agree that the right approach is to remove (or make very high) the channel timeout and set it per request everywhere. Thanks for sharing your findings! |
72c10d2
to
10a2eb1
Compare
10102c9
to
2d81e40
Compare
Now that #2771 has been merged, I've rebased this one, and manually tested the case of setting timeout to more than the configured one. It now works in both cases. |
* add timeout query param for search requests * enable timeout for recommend requests * Add query timeout for group by requests * update openapi models * Don't decrease timeout after recommend preprocessing * Add openapi test * code review * add timeout to individual group by requests, non-decreasing * handle timeout for discover * Update timeout field tag in SearchBatchPoints message
Continues upon #2293 and solves #2623
Exposes timeout param for search requests.
Affects at local shard level and internal client request. For group requests, it affects at the
GroupBy
levelChecklist:
GroupBy
Caveats
Search and recommend requests return a
500 Service Error
status because of this conversion, even when it is just a timeout error. This is different from what grouping requests return now, which is a standard408 Request Timeout
. We can make both return500
if desired, but I feel we should fix the former case.All Submissions:
dev
branch. Did you create your branch fromdev
?New Feature Submissions:
cargo +nightly fmt --all
command prior to submission?cargo clippy --all --all-features
command?Changes to Core Features: