anchor.diff:                                                         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]),
  +                        [TotalTokens, NewTokens, AvailTokens, NewAvailTokens,Pid]),
   
               %% schedule more jobs if we have more available tokens
               NewState = if
  
positive.code:     NewState.
  
  update_status_to_parent(#concurrency_throttle_state{
                           parent = Parent,
                           waiting_pool = WaitingPool,
                           active_pool = ActivePool} = State) ->
      NumActive = dict:size(ActivePool),
      NumWaiting = dict:size(WaitingPool),
      Parent ! {set_throttle_status, {NumActive, NumWaiting}},
  
negative.code: %% 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),
  
      {Signal, TargetNode} = dict:fetch(MinimumPid, WaitingPool),
      {MinimumPid, Signal, TargetNode}.
  