anchor.diff:                                     Primaries
                              end,
               NewTotal = Total + 1,
  -            case enoughReplies(W, PW, NewPrimaries, NewTotal) of
  +            NewState = case enoughReplies(W, PW, NewPrimaries, NewTotal) of
                   true ->
  -                    erlang:erase(ReqId),
  -                    reply(From, ReqId, ok);
  +                    {_, S} = do_erase(ReqId, State),
  +                    reply(From, ReqId, ok),
  +                    S;
                   false ->
  -                    erlang:put(ReqId, Rec#rec{primaries = NewPrimaries, total = NewTotal})
  +                    {_, S} = do_put(ReqId, Rec#rec{primaries = NewPrimaries, total = NewTotal}, State),
  +                    S
               end,
  -            {noreply, State}
  +            {noreply, NewState}
       end;
   handle_info(_Msg, State) ->
       {noreply, State}.
  
positive.code: 
  %% See riak_kv_ensemble_router:random for justification
  random(N) ->
      erlang:phash2(erlang:statistics(io), N) + 1.
negative.code: %%%===================================================================
  
  init(_) ->
      {ok, #state{}}.
  
  handle_call(_Request, _From, State) ->
      {reply, undefined, State}.
  
  handle_cast({put, RObj, ReqId, Preflist, #rec{from=From}=Rec}, State) ->
      NewState = case do_put(ReqId, Rec, State) of
          {undefined, S} ->
              [begin
                   Proxy = riak_core_vnode_proxy:reg_name(riak_kv_vnode, Idx),
                   {Proxy, Node} ! {ts_put, self(), RObj, ReqId, Type},
                   ok
               end || {{Idx, Node}, Type} <- Preflist],
              S;
          {_AlreadyDefined, S} ->
              reply(From, ReqId, {error, request_id_already_defined}),
              S
      end,
      {noreply, NewState};
  handle_cast({cancel, ReqId}, State) ->
      NewState = case do_erase(ReqId, State) of
          {undefined, S} ->
              S;
          {#rec{from=From}, S} ->
              reply(From, ReqId, {error, timeout}),
              S
      end,
      {noreply, NewState};
  handle_cast(_Msg, State) ->
      {noreply, State}.
  
  handle_info({ts_reply, ReqId, _Reply, Type}, State) ->
      case do_get(ReqId, State) of
          undefined->
              % the entry was likely purged by the timeout mechanism
              {noreply, State};
  