anchor.diff:  fail_reply(R, NumR, _NumNotFound, _Fails) ->
       {error, {r_val_unsatisfied, R,  NumR}}.
   
  +get_option(Name, Options, Default) ->
  +    proplists:get_value(Name, Options, Default).
  +
   schedule_timeout(infinity) ->
       undefined;
   schedule_timeout(Timeout) ->
       erlang:send_after(Timeout, self(), request_timeout).
   
  -client_reply(Reply, #state{client = Client, req_id = ReqId}) ->
  -    Client ! {ReqId, Reply}.
  +client_reply(Reply, #state{from = {raw, ReqId, Pid}}) ->
  +    Pid ! {ReqId, Reply}.
   
   merge(VResponses, AllowMult) ->
      merge_robjs([R || {R,_I} <- VResponses],AllowMult).
  
positive.code:     N = proplists:get_value(n_val,BucketProps),
      UpNodes = riak_core_node_watcher:nodes(riak_kv),
      Preflist2 = riak_core_apl:get_apl_ann(DocIdx, N, Ring, UpNodes),
      {next_state, execute, StateData#state{starttime=riak_core_util:moment(),
                                            n = N,
                                            bucket_props=BucketProps,
                                            preflist2 = Preflist2}, 0}.
  
  %% @private
  execute(timeout, StateData0=#state{timeout=Timeout, n=N, r=R0, req_id=ReqId,
                                     bkey=BKey, 
                                     bucket_props=BucketProps,
                                     preflist2 = Preflist2}) ->
      TRef = schedule_timeout(Timeout),
      R = riak_kv_util:expand_rw_value(r, R0, BucketProps, N),
      if
          R =:= error ->
              client_reply({error, {r_val_violation, R0}}, StateData0),
              {stop, normal, StateData0};
          R > N ->
              client_reply({error, {n_val_violation, N}}, StateData0),
              {stop, normal, StateData0};
          true ->
              FailThreshold = erlang:min((N div 2)+1, % basic quorum, or
                                         (N-R+1)), % cannot ever get R 'ok' replies
              AllowMult = proplists:get_value(allow_mult,BucketProps),
              Preflist = [IndexNode || {IndexNode, _Type} <- Preflist2],
              riak_kv_vnode:get(Preflist, BKey, ReqId),
              StateData = StateData0#state{n=N,r=R,fail_threshold=FailThreshold,
                                           allowmult=AllowMult,
                                           tref=TRef},
              {next_state,waiting_vnode_r,StateData}
      end.
  
  waiting_vnode_r({r, VnodeResult, Idx, _ReqId}, StateData) ->
      NewStateData1 = add_vnode_result(Idx, VnodeResult, StateData),
  
negative.code:                 startnow :: {pos_integer(), pos_integer(), pos_integer()}
                 }).
  
  -define(DEFAULT_TIMEOUT, 60000).
  -define(DEFAULT_R, quorum).
  
  %% In place only for backwards compatibility
  start(ReqId,Bucket,Key,R,Timeout,From) ->
      start_link({raw, ReqId, From}, Bucket, Key, [{r, R}, {timeout, Timeout}]).
  
  start_link(ReqId,Bucket,Key,R,Timeout,From) ->
      start_link({raw, ReqId, From}, Bucket, Key, [{r, R}, {timeout, Timeout}]).
  
  start_link(From, Bucket, Key, GetOptions) ->
      gen_fsm:start_link(?MODULE, [From, Bucket, Key, GetOptions], []).
  
  -ifdef(TEST).
  %% Create a get FSM for testing.  StateProps must include
  