Skip to content
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

Add timer:sleep()-based throttle to riak_kv_exchange_fsm:read_repair_keydiff() #785

Merged
merged 2 commits into from
Dec 24, 2013

Conversation

slfritchie
Copy link
Contributor

Develop branch version of #754

These include:

* Add timer:sleep()-based throttle to riak_kv_exchange_fsm:read_repair_keydiff()

The throttle part is easy: a 1-liner.  The rest is the infrastructure
to poll each node for its maximum vnode mailbox queue length, pick the
worst one, calculate a sleep time based on a list of {Q_length, SleepMSec},
and communicate via time-honored application env vars.

The only hot code path that reads the ETS table for app env vars is
riak_kv_exchange_fsm:read_repair_keydiff() itself, and since it is
doing a full KV get FSM plus other stuff, the extra heat on the hot
path is insignificant.

* Fix non-eunit compilation error

* Add kill switch

* Use async worker proc to query vnode status for AAE throttle check
@slfritchie
Copy link
Contributor Author

Derp, I didn't see Sean's comments from two days ago. GitHub's notifications don't work like I think they do, sorry.

@slfritchie
Copy link
Contributor Author

Per @jtuple, I'm merging now. I'll address the Cuttlefish naming thing later, sorry, @seancribbs! There's a matter of having 2 throttles now, one for tree building and this one for exchange, and perhaps they ought to be disambiguated code-wise for future maintenance? But if I go changing function names in riak_kv_entropy_manager.erl, then there's a big mess o' renaming to do ... am willing to debate the merits of doing that, when we return from end-of-year breaks.

slfritchie added a commit that referenced this pull request Dec 24, 2013
Add timer:sleep()-based throttle to riak_kv_exchange_fsm:read_repair_keydiff()
@slfritchie slfritchie merged commit fbb47d1 into develop Dec 24, 2013
@seancribbs
Copy link
Contributor

@slfritchie It's fine, we have plans to do more renaming anyway. Just wanted to save us a little work down the road...

@seancribbs seancribbs deleted the slf-aae-throttle-develop branch April 1, 2015 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants