mirror of
https://github.com/valitydev/riak_test.git
synced 2024-11-06 08:35:22 +00:00
Fix intercepts to work with new do_put return value.
c.f. basho/riak_kv#1047 basho/riak_kv#1046
This commit is contained in:
parent
1addf5207f
commit
a90a988262
@ -62,7 +62,8 @@ drop_do_put(Sender, BKey, RObj, ReqId, StartTime, Options, State) ->
|
|||||||
lager:log(info, self(), "dropping put request for ~p",
|
lager:log(info, self(), "dropping put request for ~p",
|
||||||
[Partition]),
|
[Partition]),
|
||||||
%% ?I_INFO("Dropping put for ~p on ~p", [BKey, 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 ->
|
false ->
|
||||||
?M:do_put_orig(Sender, BKey, RObj, ReqId, StartTime, Options, State)
|
?M:do_put_orig(Sender, BKey, RObj, ReqId, StartTime, Options, State)
|
||||||
end
|
end
|
||||||
@ -85,7 +86,8 @@ error_do_put(Sender, BKey, RObj, ReqId, StartTime, Options, State) ->
|
|||||||
%% deterministic
|
%% deterministic
|
||||||
timer:sleep(1000),
|
timer:sleep(1000),
|
||||||
riak_core_vnode:reply(Sender, {fail, Partition, ReqId}),
|
riak_core_vnode:reply(Sender, {fail, Partition, ReqId}),
|
||||||
State;
|
%% NB: riak_kv#1046 - do_put returns a tuple now
|
||||||
|
{error_by_intercept, State};
|
||||||
false ->
|
false ->
|
||||||
?M:do_put_orig(Sender, BKey, RObj, ReqId, StartTime, Options, State)
|
?M:do_put_orig(Sender, BKey, RObj, ReqId, StartTime, Options, State)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user