diff options
| author | Alexandru Scvortov <alexandru@rabbitmq.com> | 2011-07-22 13:33:58 +0100 |
|---|---|---|
| committer | Alexandru Scvortov <alexandru@rabbitmq.com> | 2011-07-22 13:33:58 +0100 |
| commit | 1fd63a816d59b3087b3ef3d9f4a125bc6aac6762 (patch) | |
| tree | fc73d09d5c6f9c28d92c91b4bc615d56b039ef3a /src | |
| parent | 02ccd319c6db2bd9012c8a727d195eb237d541d4 (diff) | |
| download | rabbitmq-server-git-1fd63a816d59b3087b3ef3d9f4a125bc6aac6762.tar.gz | |
rename IsDiskNode, WasDiskNode
My general rule for spelling these things was: if it's followed by
node, it should be disc; otherwise, it should be disk. So,
is_disc_node vs OnDisk. I managed to miss those two, though.
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_mnesia.erl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rabbit_mnesia.erl b/src/rabbit_mnesia.erl index 4ad0ea1173..05d0f38417 100644 --- a/src/rabbit_mnesia.erl +++ b/src/rabbit_mnesia.erl @@ -481,8 +481,6 @@ delete_previously_running_nodes() -> init_db(ClusterNodes, Force, SecondaryPostMnesiaFun) -> UClusterNodes = lists:usort(ClusterNodes), ProperClusterNodes = UClusterNodes -- [node()], - IsDiskNode = should_be_disc_node(ClusterNodes), - WasDiskNode = is_disc_node(), case mnesia:change_config(extra_db_nodes, ProperClusterNodes) of {ok, Nodes} -> case Force of @@ -496,9 +494,11 @@ init_db(ClusterNodes, Force, SecondaryPostMnesiaFun) -> end; true -> ok end, + WantDiscNode = should_be_disc_node(ClusterNodes), + WasDiscNode = is_disc_node(), %% We create a new db (on disk, or in ram) in the first %% two cases and attempt to upgrade the in the other two - case {Nodes, WasDiskNode, IsDiskNode} of + case {Nodes, WasDiscNode, WantDiscNode} of {[], _, false} -> %% New ram node; start from scratch ok = create_schema(false); @@ -516,7 +516,7 @@ init_db(ClusterNodes, Force, SecondaryPostMnesiaFun) -> ensure_version_ok( rpc:call(AnotherNode, rabbit_version, recorded, [])), {CopyType, CopyTypeAlt} = - case IsDiskNode of + case WantDiscNode of true -> {disc, disc_copies}; false -> {ram, ram_copies} end, |
