Permalink
Browse files

Removing vestiges of riak_search

  • Loading branch information...
fadushin committed Mar 7, 2017
1 parent f79eb14 commit f196993a82a3384ce1657aab06b1f317def810fe
Showing with 7 additions and 9 deletions.
  1. +7 −9 src/riak_core_claimant.erl
View
@@ -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.

0 comments on commit f196993

Please sign in to comment.