anchor.diff:      lists:sublist(get_secondaries(), NVnodes).
   
   %% Construct a list of target vnodes such that we select a total of N vnodes from different nodes,
  -%% round-robin fashion:
  +%% round-robin fashion.
  +%%      Note: This algorithm is surely inefficient, but N is expected to be small.
   gather_vnodes_rr(NVnodes) ->
  -    Secondaries = get_secondaries(),
  -    lager:info("JFW: gather_vnodes_rr: choosing from ~p secondaries", [Secondaries]).
  +
  +
  +    %% Map owners to their vnode ids (not including ourselves):
  +    HandoffMap = dict:erase(node(), lists:foldl(fun({NodeID, NodeName}, AccDict) ->
  +                                                    dict:append(NodeName, NodeID, AccDict)
  +                                                end, 
  +                                                dict:new(), get_ring_owners())),
  +
  +    HandoffMembers = lists:dropwhile(fun(NodeName) -> node() == NodeName end, get_ring_members()),
  +
  +    %% Find the smallest set in the group:
  +    {_MinKey, MinLen} = dict:fold(fun shortest_bucket/3, { undef, infinity }, HandoffMap),
  +
  +    case MinLen < NVnodes of
  +        false -> ok;
  +        true  -> erlang:throw("Requested more vnodes than available in smallest target")
  +    end,
  +
  +    interpolate_values(MinLen, HandoffMembers, HandoffMap, []).
   
   %%
   %% Selection utilities:
  
positive.code: %% code:add_path("/home/user/path-to-handoff_perftool"), l(handoff_perftool). 
  %% handoff_perftool:go({10000, 1000}).
  %% handoff_perftool:go(5, {10000, 1000}).
  %%
  
  %% JFW: code:add_path("/home/jesse/work/basho/src/riak_test-jfw-encoding_capability/current/deps/riak_core/contrib"), l(handoff_perftool).
  
  
  -module(handoff_perftool).
   
  -export([
              go/0, go/1, go/2,
  
              force_encoding/2,
              get_ring_members/0,
  
negative.code: %% Force use of a particular particular handoff encoding method:
  force_encoding(Node, HandoffEncoding) ->
      case HandoffEncoding of
          default -> log_info("Using default encoding type."), true;
  
          _       -> log_info("Forcing encoding type to ~p.", [HandoffEncoding]),
                     OverrideData =
                      [
                        { riak_core,
  