anchor.diff:          false ->
               case Msg of
                   {bulk_distribute, Proc, N, Env, Data} ->
  -                    SuccData = get_range_data(Data, SuccIntI),
  -                    ?TRACE("~p bulk_distribute: sending to succ ~p on interval ~p
  -                           I: ~p
  -                           Msg: ~p",
  -                           [self(), node:pidX(nodelist:succ(Neighbors)),
  -                            SuccIntI, I, {bulkowner, deliver, Id, SuccIntI,
  -                              {bulk_distribute, Proc, N, Env, SuccData}, Parents}]),
  +                    {SuccData, _Rest} = lists:partition(
  +                            fun(Entry) ->
  +                                intervals:in(?RT:hash_key(element(1, Entry)),
  +                                            SuccIntI)
  +                            end, Data),
                       comm:send(node:pidX(nodelist:succ(Neighbors)),
                                 {bulkowner, deliver, Id, SuccIntI,
                                 {bulk_distribute, Proc, N, Env, SuccData}, Parents});
  
positive.code: -author('schuett@zib.de').
  -vsn('$Id$').
  
  -define(TRACE(X, Y), io:format(X, Y)).
  
  -include("scalaris.hrl").
  
  % public API:
  -export([issue_bulk_owner/3, issue_send_reply/4,
           issue_bulk_distribute/5, issue_bulk_distribute/6,
           send_reply/5, send_reply_failed/6]).
  
  % only use inside the dht_node process:
  
negative.code:     MyDBRange = intervals:union(dht_node_state:get(State, my_range), DBRange),
      MyRange0 = lists:foldl(F, Range, MsgFwd),
      MyRange = intervals:intersection(MyRange0, MyDBRange),
      case intervals:is_empty(MyRange) of
          true -> ok;
          _ ->
              case Msg of
                  {bulk_read_entry, Issuer} ->
                      Data = db_dht:get_entries(dht_node_state:get(State, db), MyRange),
                      ReplyMsg = {bulk_read_entry_response, MyRange, Data},
                      % for aggregation using a tree, activate this instead:
                      % issue_send_reply(Id, Issuer, ReplyMsg, Parents);
                      comm:send(Issuer, {bulkowner, reply, Id, ReplyMsg});
                  {bulk_distribute, Proc, N, Msg1, Data} ->
                      RangeData =
                          [Entry || Entry <- Data,
                                    intervals:in(?RT:hash_key(element(1, Entry)),
                                                 MyRange)],
                      %% only deliver data in MyRange as data outside of it was
                      %% forwarded
                      comm:send_local(pid_groups:get_my(Proc),
                                      {bulk_distribute, Id, MyRange, 
                                       setelement(N, Msg1, RangeData), Parents});
                  {?send_to_group_member, Proc, Msg1} when Proc =/= dht_node ->
                      comm:send_local(pid_groups:get_my(Proc),
                                      {bulkowner, deliver, Id, MyRange, Msg1, Parents});
                  {do_snapshot, _SnapNo, _Leader} ->
                      comm:send_local(pid_groups:get_my(dht_node), Msg);
                  MrMsg when mr =:= element(1, MrMsg) ->
                      comm:send_local(pid_groups:get_my(dht_node), Msg)
              end
      end,
      RestRange = intervals:minus(MyRange0, MyRange),
  