anchor.diff:      Errors =
           lists:foldr(
             fun (#doc{id = Id, rev = Rev} = Doc, ErrorsAcc) ->
  -                  case do_update_replicated_doc(Bucket, VBucket, Doc) of
  +                  case do_update_replicated_doc_loop(Bucket, VBucket, Doc) of
                         ok ->
                             ErrorsAcc;
                         {error, Error} ->
  
positive.code:             {error, {bad_request, einval}}
      end.
  
  filter_out_mccouch_fields({Props}) ->
      FilteredProps = lists:filter(
                        fun ({<<$$, _/binary>>, _Value}) ->
                                false;
                            ({_, _}) ->
                                true
                        end, Props),
      {FilteredProps}.
  
negative.code:               (_, _) ->
                    throw(unsupported)
            end, [], JsonDocIdRevs),
  
      NumCandidates = length(JsonDocIdRevs),
      RemoteWinners = length(Results),
      ?xdcr_debug("after conflict resolution for ~p docs, num of remote winners is ~p and "
                  "number of local winners is ~p.",
                  [NumCandidates, RemoteWinners, (NumCandidates-RemoteWinners)]),
      {ok, Results}.
  
  update_replicated_docs(#db{name = DbName}, Docs, Options) ->
      {Bucket, VBucket} = capi_utils:split_dbname(DbName),
  
  