Skip to content

Commit

Permalink
Removing vestiges of riak_search (#906)
Browse files Browse the repository at this point in the history
* Removing vestiges of riak_search
  • Loading branch information
fadushin authored and thumbot committed Mar 10, 2017
1 parent 1c3d0df commit 191c4fa
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/riak_core_claimant.erl
Original file line number Diff line number Diff line change
Expand Up @@ -569,17 +569,15 @@ valid_resize_request(NewRingSize, [], Ring) ->
%% for dynamic ring, if all registered applications support it
%% the cluster is capable. core knowing about search/kv is :(
ControlRunning = app_helper:get_env(riak_control, enabled, false),
SearchRunning = app_helper:get_env(riak_search, enabled, false),
NodeCount = length(riak_core_ring:all_members(Ring)),
Changes = length(riak_core_ring:pending_changes(Ring)) > 0,
case {ControlRunning, SearchRunning, Capable, IsResizing, NodeCount, Changes} of
{false, false, true, true, N, false} when N > 1 -> true;
{true, _, _, _, _, _} -> {error, control_running};
{_, true, _, _, _, _} -> {error, search_running};
{_, _, false, _, _, _} -> {error, not_capable};
{_, _, _, false, _, _} -> {error, same_size};
{_, _, _, _, 1, _} -> {error, single_node};
{_, _, _, _, _, true} -> {error, pending_changes}
case {ControlRunning, Capable, IsResizing, NodeCount, Changes} of
{false, true, true, N, false} when N > 1 -> true;
{true, _, _, _, _} -> {error, control_running};
{_, false, _, _, _} -> {error, not_capable};
{_, _, false, _, _} -> {error, same_size};
{_, _, _, 1, _} -> {error, single_node};
{_, _, _, _, true} -> {error, pending_changes}
end.


Expand Down

0 comments on commit 191c4fa

Please sign in to comment.