Skip to content

Commit 911d0d5

Browse files
author
Alexandru Scvortov
committed
only output warning if clustered
1 parent 3395a58 commit 911d0d5

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/rabbit_mnesia.erl

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,10 @@ cluster(ClusterNodes, Force) ->
122122
ensure_mnesia_not_running(),
123123
ensure_mnesia_dir(),
124124

125-
case not Force andalso is_only_disc_node(node(), false) andalso
126-
not should_be_disc_node(ClusterNodes) of
125+
case not Force andalso is_clustered() andalso
126+
is_only_disc_node(node(), false) andalso
127+
not should_be_disc_node(ClusterNodes)
128+
of
127129
true -> log_both("last running disc node leaving cluster");
128130
_ -> ok
129131
end,
@@ -715,7 +717,9 @@ wait_for_tables(TableNames) ->
715717

716718
reset(Force) ->
717719
ensure_mnesia_not_running(),
718-
case not Force andalso is_only_disc_node(node(), false) of
720+
case not Force andalso is_clustered() andalso
721+
is_only_disc_node(node(), false)
722+
of
719723
true -> log_both("no other disc nodes running");
720724
false -> ok
721725
end,

0 commit comments

Comments
 (0)