anchor.diff:              ok
       end,
   
  +    TimeStart = now(),
  +    %% enumerate all docs and update them
       Errors =
           lists:foldr(
             fun (#doc{id = Id, rev = Rev} = Doc, ErrorsAcc) ->
  
positive.code: %% public functions
  get_missing_revs(#db{name = DbName}, JsonDocIdRevs) ->
      {Bucket, VBucket} = capi_utils:split_dbname(DbName),
      Results =
          lists:foldr(
            fun ({Id, Rev}, Acc) ->
  
negative.code:           end,
            [], Docs),
  
      TimeSpent = timer:now_diff(now(), TimeStart) div 1000,
      AvgLatency = TimeSpent div length(Docs),
      case Errors of
          [] ->
              ?xdcr_debug("[Bucket:~p, Vb:~p]: successfully update ~p replicated mutations "
                          "(time spent in ms: ~p, avg latency per doc in ms: ~p)",
                          [Bucket, VBucket, length(Docs), TimeSpent, AvgLatency]),
  
              ok;
          [FirstError | _] ->
              %% for some reason we can only return one error. Thus
              %% we're logging everything else here
              ?xdcr_error("[Bucket: ~p, Vb: ~p] Error: could not update docs. Time spent in ms: ~p, "
                          "# of docs trying to update: ~p, error msg: ~n~p",
                          [Bucket, VBucket, TimeSpent, length(Docs), Errors]),
              {ok, FirstError}
      end.
  
  