anchor.diff:       State#state{open_dbs=lists:delete(DBRef, DBs)}}.
   
   %% @doc Performs the actual repair work, called from a spawned process.
  --spec repair_partition(integer(), integer(), {pid(), any()}, pid()) ->
  +-spec repair_partition(integer(), integer()|undefined, atom()|pid(), pid()) ->
       #partition_result{}.
   repair_partition(Partition, DutyCycle, From, TreePid) ->
       case get_hashtree_lock(TreePid, ?LOCK_RETRIES) of
  
positive.code:     NumFound = wait_for_index_scan(Ref, BatchRef, StartTime, WaitFactor),
      case NumFound of
          {error, _} = Err ->
              destroy_index_data_db(DBDir, DBRef),
              Err;
          _ ->
              lager:info("Grabbed ~p index data entries from partition ~p",
  
negative.code:          caller :: pid(),
           reply_to,
           early_reply,
           aae_pid_req_id :: reference() | undefined,
           aae_pid_timer :: reference() | undefined,
           worker_monitor :: reference() | undefined,
           worker_status :: worker_status(),
           index_scan_count = 0 :: integer(),
           hashtree_population_count = 0 :: integer(),
           exchange_count = 0 :: integer(),
           open_dbs = [] :: [eleveldb:db_ref()]
          }).
  
  -record(partition_result, {
  