anchor.diff:  -include("xdc_replicator.hrl").
   -include("mc_entry.hrl").
   -include("mc_constants.hrl").
  +
  +-define(SLOW_THRESHOLD_SECONDS, 180).
   
   %% public functions
   get_missing_revs(#db{name = DbName}, JsonDocIdRevs) ->
  
positive.code:                  TimeSpent, AvgLatency]),
  
      %% dump error msg if timeout
      {value, DefaultConnTimeout} = ns_config:search(xdcr_connection_timeout),
      DefTimeoutSecs = misc:getenv_int("XDCR_CONNECTION_TIMEOUT", DefaultConnTimeout),
      TimeSpentSecs = TimeSpent div 1000,
      case TimeSpentSecs > DefTimeoutSecs of
          true ->
              ?xdcr_error("[Bucket:~p, Vb:~p]: conflict resolution for ~p docs  takes too long to finish!"
                          "(total time spent: ~p secs, default connection time out: ~p secs)",
                          [Bucket, VBucket, NumCandidates, TimeSpentSecs, DefTimeoutSecs]);
          _ ->
              ok
      end,
  
negative.code:     AvgLatency = TimeSpent div length(Docs),
  
      %% dump error msg if timeout
      TimeSpentSecs = TimeSpent div 1000,
      case TimeSpentSecs > ?SLOW_THRESHOLD_SECONDS of
          true ->
              ?xdcr_error("[Bucket:~p, Vb:~p]: update ~p docs takes too long to finish!"
                          "(total time spent: ~p secs)",
                          [Bucket, VBucket, length(Docs), TimeSpentSecs]);
          _ ->
              ok
      end,
  