-
Notifications
You must be signed in to change notification settings - Fork 156
Add timeout-constrained version of execute on RiakClient #642
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
Conversation
|
Special thanks to @bwittwer for the original PR! |
|
@alexmoore please to be fixing your builds :-P |
|
What happens when you execute a long-running Riak command, but specify a short timeout? Does the client disregard the value when returned by Riak? |
|
Yep, the command's execution will throw a TimeoutException(), and unblock the user thread. The operation will continue to process on Riak && the client's backend/netty threads until it completes in some fashion. |
|
OK I just want to make sure that the data returned from Riak is discarded and not used somehow by a different command. |
|
Other than my concern, 👍 |
|
Nope, it should be discarded once the operation is complete, and the resources returned to the pool. It'll keep running in the background, but we'd need to add operation cancellation in to fix that (another issue). |
This supersedes PR #610 (CLIENTS-922), by adding tests to the original PR.