anchor.diff:      %% register for monitor events so we can adjust buffers on 
       %% new connections when they're started.
       ok = net_kernel:monitor_nodes(true, [{node_type, visible}, nodedown_reason]),
  +    {SendBufSz, RecBufSz} = get_riak_env_vars(),
       DistCtrl = erlang:system_info(dist_ctrl),
       %% make sure that buffers are correct on existing connections.
  -    [set_port_buffers(Port)
  +    [set_port_buffers(Port, SendBufSz, RecBufSz)
        || {_Node, Port} <- DistCtrl],
  -    {ok, #state{}}.
  +    {ok, #state{sndbuf=SendBufSz, recbuf=RecBufSz}}.
   
  -
  +get_riak_env_vars() ->
  +    {ok, SndBufSz} = application:get_env(riak_core, dist_send_buf_size),
  +    {ok, RecBufSz} = application:get_env(riak_core, dist_recv_buf_size),
  +    {SndBufSz, RecBufSz}.
   
   handle_call({set_dist_buf_sizes, SendSz, RecvSz}, _From, State) ->
  -    Reply = 
  -        [inet:setopts(Port, [{sndbuf, SendSz}, {recbuf, RecvSz}])
  -         || {_Node, Port} <- erlang:system_info(dist_ctrl)],
  -    {reply, Reply, State};
  +    [set_port_buffers(Port, SendSz, RecvSz)
  +     || {_Node, Port} <- erlang:system_info(dist_ctrl)],
  +    {reply, ok, State#state{sndbuf=SendSz, recbuf=RecvSz}};
   handle_call(Msg, _From, State) ->
       lager:warning("unknown call message received: ~p", [Msg]),
       {noreply, State}.
  
positive.code: 
  -module(riak_core_dist_mon).
  
  -export([start_link/0, set_dist_buf_sizes/2]).
  
  %% gen_server callbacks
  -behavior(gen_server).
  -export([init/1, handle_call/3, handle_cast/2, handle_info/2,
           terminate/2, code_change/3]).
  
  -record(state, {}).
  
  %% provided for testing convenience and debugging.
  set_dist_buf_sizes(SendSz, RecvSz) 
  
negative.code: 
  %% private 
  
  set_port_buffers(Port, SendBufSz, RecBufSz) ->
      inet:setopts(Port, [{sndbuf, SendBufSz},
                          {recbuf, RecBufSz}]).
  