Skip to content

Commit

Permalink
Revert "fix: single node state (#2574)"
Browse files Browse the repository at this point in the history
This reverts commit afef1b2.
  • Loading branch information
janl authored and wohali committed Feb 20, 2020
1 parent 5f6a76d commit 72ce32e
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/setup/src/setup.erl
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,13 @@ is_cluster_enabled() ->
end.

is_single_node_enabled(Dbs) ->
% admins != empty AND dbs exist OR `[couchdb] single_node` is set to true
% admins != empty AND dbs exist
Admins = config:get("admins"),
HasDbs = has_cluster_system_dbs(Dbs),
SingleNodeConfig = config:get_boolean("couchdb", "single_node", false),
case {Admins, HasDbs, SingleNodeConfig} of
{_, _, true} -> true;
{[], _, _} -> false;
{_, false, _} -> false;
{_,_,_} -> true
case {Admins, HasDbs} of
{[], _} -> false;
{_, false} -> false;
{_,_} -> true
end.

cluster_system_dbs() ->
Expand Down

0 comments on commit 72ce32e

Please sign in to comment.