Skip to content

Commit

Permalink
Fix intercepts to work with new do_put return value.
Browse files Browse the repository at this point in the history
  • Loading branch information
seancribbs authored and John Burwell committed Jan 6, 2015
1 parent 554eb0e commit a4bf8b2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions intercepts/riak_kv_vnode_intercepts.erl
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ drop_do_put(Sender, BKey, RObj, ReqId, StartTime, Options, State) ->
lager:log(info, self(), "dropping put request for ~p",
[Partition]),
%% ?I_INFO("Dropping put for ~p on ~p", [BKey, Partition]),
State;
%% NB: riak_kv#1046 - do_put returns a tuple now
{dropped_by_intercept, State};
false ->
?M:do_put_orig(Sender, BKey, RObj, ReqId, StartTime, Options, State)
end
Expand All @@ -85,7 +86,8 @@ error_do_put(Sender, BKey, RObj, ReqId, StartTime, Options, State) ->
%% deterministic
timer:sleep(1000),
riak_core_vnode:reply(Sender, {fail, Partition, ReqId}),
State;
%% NB: riak_kv#1046 - do_put returns a tuple now
{error_by_intercept, State};
false ->
?M:do_put_orig(Sender, BKey, RObj, ReqId, StartTime, Options, State)
end
Expand Down

0 comments on commit a4bf8b2

Please sign in to comment.