anchor.diff:  %% minimum active replications
   choose_pid_to_schedule(WaitingPool, TargetLoad) ->
       {MinimumPid, _Load} = dict:fold(
  -                           fun(Pid, {_, CurrNode}, {MinPid, MinLoad}) ->
  -                                   case dict:is_key(CurrNode, TargetLoad) of
  -                                       false ->
  -                                           {Pid, 0};
  -                                       _ ->
  -                                           CurrLoad = dict:fetch(CurrNode, TargetLoad),
  -                                           case CurrLoad < MinLoad of
  -                                               true ->
  -                                                   {Pid, CurrLoad};
  -                                               _  ->
  -                                                   {MinPid, MinLoad}
  -                                           end
  -                                   end
  -                           end,
  -                           %% the max # of active resp per node is the number of vbuckets
  -                           {0, 9999},
  -                           WaitingPool),
  +                            fun(Pid, {_, CurrNode}, {MinPid, MinLoad}) ->
  +                                    case dict:is_key(CurrNode, TargetLoad) of
  +                                        false ->
  +                                            {Pid, 0};
  +                                        _ ->
  +                                            CurrLoad = dict:fetch(CurrNode, TargetLoad),
  +                                            case CurrLoad < MinLoad of
  +                                                true ->
  +                                                    {Pid, CurrLoad};
  +                                                _  ->
  +                                                    {MinPid, MinLoad}
  +                                            end
  +                                    end
  +                            end,
  +                            %% the max # of active resp per node is the number of vbuckets
  +                            {0, 9999},
  +                            WaitingPool),
   
       {Signal, TargetNode} = dict:fetch(MinimumPid, WaitingPool),
       {MinimumPid, Signal, TargetNode}.
  
positive.code:                 [Pid, TargetNode, NewCount, TotalTokens]),
  
      NewState = State#concurrency_throttle_state{
                    avail_tokens = NewCount,
                    monitor_dict = NewMonDict,
                    target_load = NewTargetLoad,
                    active_pool = NewActivePool},
  
      {reply, ok, update_status_to_parent(NewState)};
  
  
negative.code:                                                        avail_tokens = NewAvailTokens},
              ?xdcr_debug("number of total tokens changes from ~p to ~p, "
                          "number of available tokens changes from  ~p to ~p, reported by replicator: ~p",
                          [TotalTokens, NewTokens, AvailTokens, NewAvailTokens,Pid]),
  
              %% schedule more jobs if we have more available tokens
              NewState = if
  