anchor.diff:           caller :: pid(),
            reply_to,
            early_reply,
  -         aae_pid_req_id :: pid() | undefined,
  +         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 = [] :: [reference()]
  +         open_dbs = [] :: [eleveldb:db_ref()]
           }).
   
   -record(partition_result, {
  
positive.code: wait_for_aae_pid({ReqId, {ok, TreePid}},
                   State=#state{aae_pid_req_id=ReqId, speed=Speed,
                                aae_pid_timer=Timer,
                                remaining=[Partition|_]}) ->
      gen_fsm:cancel_timer(Timer),
      WorkerFun =
      fun() ->
              Res =
              repair_partition(Partition, Speed, ?MODULE, TreePid),
              gen_fsm:sync_send_event(?MODULE, {repair_result, Res}, infinity)
      end,
      Mon = monitor(process, spawn_link(WorkerFun)),
      {next_state, wait_for_repair, State#state{worker_monitor=Mon,
  
negative.code:     wait_for_aae_pid({ReqId, {error, undefined_aae_pid}}, State);
  wait_for_aae_pid({ReqId, {error, Err}}, State=#state{aae_pid_req_id=ReqId,
                                                       aae_pid_timer=Timer}) ->
      _ = gen_fsm:cancel_timer(Timer),
      State2 = State#state{aae_pid_timer=undefined},
      State3 = add_result(#partition_result{status=error, error={no_aae_pid, Err}}, State2),
      State4 = maybe_notify(State3, {error, {no_aae_pid, Err}}),
  