anchor.diff:           operation      = undefined    									:: undefined | operation(),
            my_range       = undefined                                     :: undefined | intervals:interval(),
            feedbackDestPid= undefined                                     :: undefined | comm:mypid(),
  -         feedbackKvv    = []                                            :: kvv_list(),
  +         feedbackKvv    = {[], gb_trees:empty()}                        :: {MissingOnOther::kvv_list(), MyIKvTree::gb_tree()},
            send_stats     = undefined                                     :: undefined | comm:mypid(),
            stats          = #resolve_stats{}                              :: stats()
            }).
  
positive.code: on({get_state_response, MyI}, State = 
         #rr_resolve_state{ operation = {key_upd, KvvList},
                            dhtNodePid = DhtPid, stats = Stats }) ->
      ToUpdate = start_update_key_entry(KvvList, MyI, comm:this(), DhtPid),
      ?TRACE("GET INTERVAL - Operation=~p~n SessionId:~p~n MyInterval=~p~n KVVListLen=~p ; ToUpdate=~p",
             [key_upd, Stats#resolve_stats.session_id, MyI, length(KvvList), ToUpdate], State),
      NewState = State#rr_resolve_state{stats = Stats#resolve_stats{diff_size = ToUpdate}},
      if ToUpdate =:= 0 ->
             shutdown(resolve_ok, NewState,
                      State#rr_resolve_state.feedbackDestPid, [], []);
         true ->
             % note: shutdown and feedback handled by update_key_entry_ack
             NewState
      end;
  
  on({get_state_response, MyI}, State =
  
negative.code: %%      PreCond: KvvList contains only unique keys
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
  -spec map_kvv_list(kvv_list(), intervals:interval()) -> kvv_list().
  map_kvv_list(KvvList, MyI) ->
      ?ASSERT(length(KvvList) =:= length(lists:ukeysort(1, KvvList))),
      [{RKey, Val, Vers} || {Key, Val, Vers} <- KvvList,
                            RKey <- ?RT:get_replica_keys(Key),
                            intervals:in(RKey, MyI)].
  
  -spec start_update_key_entry(MyIKvvList::kvv_list(), comm:mypid(),
                               comm:erl_local_pid()) -> non_neg_integer().
  start_update_key_entry(MyIKvvList, MyPid, DhtPid) ->
      comm:send_local(DhtPid, {update_key_entry, MyPid, MyIKvvList}),
      length(MyIKvvList).
  
  -spec integrate_update_key_entry_ack(
          [{Entry::db_entry:entry(), Exists::boolean(), Done::boolean()}],
          UpdOk::non_neg_integer(), UpdFail::non_neg_integer(),
          RegenOk::non_neg_integer(), RegenFail::non_neg_integer(),
          FBItems::kvv_list(), OtherKvTree::gb_tree(), FBOn::boolean())
          -> {UpdOk::non_neg_integer(), UpdFail::non_neg_integer(),
              RegenOk::non_neg_integer(), RegenFail::non_neg_integer(),
              FBItems::kvv_list()}.
  integrate_update_key_entry_ack([], UpdOk, UpdFail, RegenOk, RegenFail, FBItems,
                                 _OtherKvTree, _FBOn) ->
      {UpdOk, UpdFail, RegenOk, RegenFail, FBItems};
  integrate_update_key_entry_ack([{Entry, Exists, Done} | Rest], UpdOk, UpdFail,
                                 RegenOk, RegenFail, FBItems, OtherKvTree, FBOn) ->
      NewFBItems =
          if not Done andalso Exists andalso FBOn ->
                 case gb_trees:lookup(db_entry:get_key(Entry), OtherKvTree) of
                     none -> [entry_to_kvv(Entry) | FBItems];
                     {value, OtherVersion} ->
                         MyVersion = db_entry:get_version(Entry),
                         if MyVersion > OtherVersion ->
                                [entry_to_kvv(Entry) | FBItems];
                            true ->
                                FBItems
                         end
                 end;
             true -> FBItems
          end,
      if Done andalso Exists ->
             integrate_update_key_entry_ack(
               Rest, UpdOk + 1, UpdFail, RegenOk, RegenFail, NewFBItems, OtherKvTree, FBOn);
         Done andalso not Exists ->
             integrate_update_key_entry_ack(
               Rest, UpdOk, UpdFail, RegenOk + 1, RegenFail, NewFBItems, OtherKvTree, FBOn);
         not Done and Exists ->
             integrate_update_key_entry_ack(
               Rest, UpdOk, UpdFail + 1, RegenOk, RegenFail, NewFBItems, OtherKvTree, FBOn);
         not Done and not Exists ->
             integrate_update_key_entry_ack(
               Rest, UpdOk, UpdFail, RegenOk, RegenFail + 1, NewFBItems, OtherKvTree, FBOn)
      end.
  
  -spec shutdown(exit_reason(), state(), undefined | comm:mypid(), kvv_list(),
  