Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Ensure timestamp passed to riak_object:syntactic_merge on read repair.

Fixes: bz://1094
  • Loading branch information...
commit 3b8fe9e8170b7dc9225acbbcd7bfe3f64557a60a 1 parent 8e47baf
@jonmeredith jonmeredith authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/riak_kv_vnode.erl
View
7 src/riak_kv_vnode.erl
@@ -76,7 +76,8 @@
robj :: term(),
reqid :: non_neg_integer(),
bprops :: maybe_improper_list(),
- prunetime :: undefined | non_neg_integer()}).
+ starttime :: non_neg_integer(),
+ prunetime :: undefined| non_neg_integer()}).
%% TODO: add -specs to all public API funcs, this module seems fragile?
@@ -308,6 +309,7 @@ do_put(Sender, {Bucket,_Key}=BKey, RObj, ReqID, StartTime, Options, State) ->
robj=RObj,
reqid=ReqID,
bprops=BProps,
+ starttime=StartTime,
prunetime=PruneTime},
Reply = perform_put(prepare_put(State, PutArgs), State, PutArgs),
riak_core_vnode:reply(Sender, Reply),
@@ -319,8 +321,9 @@ prepare_put(#state{mod=Mod,modstate=ModState}, #putargs{bkey=BKey,
robj=RObj,
reqid=ReqID,
bprops=BProps,
+ starttime=StartTime,
prunetime=PruneTime}) ->
- case syntactic_put_merge(Mod, ModState, BKey, RObj, ReqID, PruneTime) of
+ case syntactic_put_merge(Mod, ModState, BKey, RObj, ReqID, StartTime) of
{oldobj, OldObj} ->
{false, OldObj};
{newobj, NewObj} ->
Please sign in to comment.
Something went wrong with that request. Please try again.