anchor.diff:  %% Send the next batch of terms
   -spec send_batch(#state{}) -> {statename(), #state{}}.
   send_batch(#state{terms=[]}=State) ->
  +    [gen_fsm:reply(From, ok) || From <- State#state.overload_waiters],
       gen_fsm:send_event(self(), empty),
  -    {idle, State};
  +    {idle, State#state{overload_waiters=[]}};
   send_batch(State) ->
       {Rest, PlTerms, TermCount} = lookup_preflist(State#state.batch_size,
                                                    0,
  
positive.code:                         end, 0, PlTerms),
      Timer = gen_fsm:send_event_after(?RECV_TIMEOUT_USECS, {Ref, recv_timeout}),
      UpdNumTerms = State#state.num_terms - TermCount,
      State1 = State#state{terms = Rest,
                           num_terms = UpdNumTerms,
                           ref = Ref,
                           replies_left = Sent,
  
negative.code: index_terms(Pid, Terms, Timeout) ->
      %% Add the keyclock
      K = riak_search_utils:current_key_clock(),
      %% Terms1 = [{I,F,T,V,P,K} || {I,F,T,V,P} <- Terms],
      %% Rc = gen_fsm:sync_send_event(Pid, {index, Terms1}, Timeout),
      F = fun({I,F,T,V,P}, Status) ->
                  NewStatus = gen_fsm:sync_send_event(Pid, {index, [{I,F,T,V,P,K}]}, Timeout),
                  case Status of
                      ok ->
                          NewStatus;
                      _ ->
                          Status
                  end
          end,
      lists:foldl(F, ok, Terms).
  
  %% Signal we are done and wait for the FSM to complete and exit
  -spec done(pid()) -> ok.
  