anchor.diff:      Errors =
           lists:foldr(
             fun (#doc{id = Id, revs = {Pos, [RevId | _]}} = Doc, ErrorsAcc) ->
  -                  case do_update_replicated_doc(Bucket, Doc) of
  +                  case do_update_replicated_doc(Bucket, UserCtx, Doc) of
                         ok ->
                             ErrorsAcc;
                         {error, Error} ->
  
positive.code:           fun ({Id, [Rev]}, Acc) ->
                    {VBucket, _Node} = cb_util:vbucket_from_id(Bucket, Id),
  
                    case ns_memcached:get_meta(Bucket, Id, VBucket) of
                        {memcached_error, key_enoent, _} ->
                            [{Id, [Rev], []} | Acc];
                        {memcached_error, not_my_vbucket, _} ->
                            throw({bad_request, not_my_vbucket});
                        {ok, _, _, {revid, OurRev}} ->
                            case winner(Rev, OurRev) of
                                ours ->
                                    Acc;
  
negative.code: -include("mc_entry.hrl").
  -include("mc_constants.hrl").
  
  get_missing_revs(#db{name = BucketBin, user_ctx = UserCtx}, JsonDocIdRevs) ->
      Bucket = binary_to_list(BucketBin),
  
      Results =
  