Skip to content

Commit

Permalink
Check AAE throttle only when AAE is enabled
Browse files Browse the repository at this point in the history
Move the AAE throttle check to the actual tick function to prevent it
from running when AAE is disabled.  Otherwise, users see AAE throttle
messages when AAE is not enabled and that is just plain confusing.
  • Loading branch information
rzezeski committed Jul 16, 2014
1 parent dede0e7 commit d41cd93
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/riak_kv_entropy_manager.erl
Original file line number Diff line number Diff line change
Expand Up @@ -309,9 +309,8 @@ handle_cast(_Msg, State) ->
{noreply, State}.

handle_info(tick, State) ->
State1 = query_and_set_aae_throttle(State),
State2 = maybe_tick(State1),
{noreply, State2};
State1 = maybe_tick(State),
{noreply, State1};
handle_info(reset_build_tokens, State) ->
State2 = reset_build_tokens(State),
schedule_reset_build_tokens(),
Expand Down Expand Up @@ -508,7 +507,8 @@ maybe_tick(State) ->
-spec tick(state()) -> state().
tick(State) ->
{ok, Ring} = riak_core_ring_manager:get_my_ring(),
State2 = maybe_reload_hashtrees(Ring, State),
State1 = query_and_set_aae_throttle(State),
State2 = maybe_reload_hashtrees(Ring, State1),
State3 = lists:foldl(fun(_,S) ->
maybe_poke_tree(S)
end, State2, lists:seq(1,10)),
Expand Down

5 comments on commit d41cd93

@borshop
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from slfritchie
at d41cd93

@borshop
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging basho/riak_kv/bugfix/969 = d41cd93 into borshop-integration-1004-bugfix/969

@borshop
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

basho/riak_kv/bugfix/969 = d41cd93 merged ok, testing candidate = cdde007

@borshop
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@borshop
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding develop to borshop-integration-1004-bugfix/969 = cdde007

Please sign in to comment.