Permalink
Browse files

Merge pull request #262 from basho/jdb-handoff-toggle

  • Loading branch information...
2 parents 798dc70 + 3504ad1 commit a8369b74f1b4e6b65479a20d0132c6caeefce423 @jtuple jtuple committed Dec 20, 2012
Showing with 12 additions and 2 deletions.
  1. +12 −2 src/riak_core_handoff_manager.erl
@@ -74,10 +74,20 @@ init([]) ->
{ok, #state{excl=ordsets:new(), handoffs=[]}}.
add_outbound(Module,Idx,Node,VnodePid) ->
- gen_server:call(?MODULE,{add_outbound,Module,Idx,Node,VnodePid},infinity).
+ case application:get_env(riak_core, disable_outbound_handoff) of
+ {ok, true} ->
+ {error, max_concurrency};
+ _ ->
+ gen_server:call(?MODULE,{add_outbound,Module,Idx,Node,VnodePid},infinity)
+ end.
add_inbound(SSLOpts) ->
- gen_server:call(?MODULE,{add_inbound,SSLOpts},infinity).
+ case application:get_env(riak_core, disable_inbound_handoff) of
+ {ok, true} ->
+ {error, max_concurrency};
+ _ ->
+ gen_server:call(?MODULE,{add_inbound,SSLOpts},infinity)
+ end.
%% @doc Initiate a transfer from `SrcPartition' to `TargetPartition'
%% for the given `Module' using the `FilterModFun' filter.

0 comments on commit a8369b7

Please sign in to comment.