forked from basho/riak_kv
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Timeout on fold/query #17
Comments
Timings comparing different json libraries for processing 2i query results (with return_terms and no continuation):
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When running a fold or query, the timeout is monitored in the riak_client
wait_for_query_results/2
/wait_for_fold_results
receive loop. There is also a timeout on theriak_core_coverage_fsm
prompted on the init (usinggen_fsm:start_timer/2
).If the receive loop within riak_client sees the timeout elapse first, it will return
{error, timeout}
and a{halt, 503}
response is captured at the webmachine layer. However, if the timeout on the init function (i.e. thegen_fsm:start_timer/2
) is the first to trigger, it will call Mod:finish, which will return{ReqID, {error, timeout}}
to the receive loop - and this prompts a response of{error, {error, timeout}}
- which is treated at the webmachine layer as a generic failure and triggers a 500 response.The response to a timeout on a query should be consistent, and probably should be 503 not 500.
The additional complexity is that some of the processing of the result occurs outside of the timeout (i.e. the json encoding). This may mean that a response is received by the client a significant amount of time after the expected timeout. Is this reasonable? Should the production of the response be included within the timeout period?
The text was updated successfully, but these errors were encountered: