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: 
      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) ->
  
negative.code: %% public functions
  get_missing_revs(#db{name = DbName}, JsonDocIdRevs) ->
      {Bucket, VBucket} = capi_utils:split_dbname(DbName),
      TimeStart = now(),
      %% enumerate all keys and fetch meta data by getMeta for each of them to ep_engine
      Results =
          lists:foldr(
            fun ({Id, Rev}, Acc) ->
  