Merge pull request #1143 from basho/nem-fix-overload-intercepts

Fix riak_kv_get_fsm intercept used by overload
This commit is contained in:
Nick Marino 2016-09-08 10:59:03 -04:00 committed by GitHub
commit 76bf3c2ba3
2 changed files with 4 additions and 4 deletions

View File

@ -23,9 +23,9 @@
-include("intercept.hrl").
-define(M, riak_kv_get_fsm_orig).
count_start_link_4(From, Bucket, Key, GetOptions) ->
?I_INFO("sending startlink/4 through proxy"),
case ?M:start_link_orig(From, Bucket, Key, GetOptions) of
count_start_4(From, Bucket, Key, GetOptions) ->
?I_INFO("sending start/4 through proxy"),
case ?M:start_orig(From, Bucket, Key, GetOptions) of
{error, overload} ->
?I_INFO("riak_kv_get_fsm not started due to overload.");
{ok, _} ->

View File

@ -263,7 +263,7 @@ run_test(Nodes, BKV) ->
timer:sleep(5000),
rt:load_modules_on_nodes([?MODULE], Nodes),
overload_proxy:start_link(),
rt_intercept:add(Node1, {riak_kv_get_fsm, [{{start_link, 4}, count_start_link_4}]}),
rt_intercept:add(Node1, {riak_kv_get_fsm, [{{start, 4}, count_start_4}]}),
Victim = get_victim(Node1, BKV),
lager:info("Suspending vnode ~p/~p",