diff options
author | Matthias Radestock <matthias@rabbitmq.com> | 2010-07-22 16:21:57 +0100 |
---|---|---|
committer | Matthias Radestock <matthias@rabbitmq.com> | 2010-07-22 16:21:57 +0100 |
commit | bd147a0310a76bfaa539ddc9ece7ff4c2392b81e (patch) | |
tree | 946832b553564df2a48f8ab96f0ed1ff61978228 | |
parent | 86a7ad787334356739079279880c6947c82b0c67 (diff) | |
parent | 44aa92813fc005dcbb77fa77d0fd99fe455d269b (diff) | |
download | rabbitmq-server-bd147a0310a76bfaa539ddc9ece7ff4c2392b81e.tar.gz |
merge bug21673 into default
-rw-r--r-- | src/rabbit_mnesia.erl | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/rabbit_mnesia.erl b/src/rabbit_mnesia.erl index e2b6927f..689f799d 100644 --- a/src/rabbit_mnesia.erl +++ b/src/rabbit_mnesia.erl @@ -77,7 +77,7 @@ status() -> {disc, disc_copies}, {ram, ram_copies}], begin - Nodes = mnesia:table_info(schema, CopyType), + Nodes = nodes_of_type(CopyType), Nodes =/= [] end]; no -> case mnesia:system_info(db_nodes) of @@ -144,6 +144,15 @@ empty_ram_only_tables() -> %%-------------------------------------------------------------------- +nodes_of_type(Type) -> + %% This function should return the nodes of a certain type (ram, + %% disc or disc_only) in the current cluster. The type of nodes + %% is determined when the cluster is initially configured. + %% Specifically, we check whether a certain table, which we know + %% will be written to disk on a disc node, is stored on disk or in + %% RAM. + mnesia:table_info(rabbit_durable_exchange, Type). + table_definitions() -> [{rabbit_user, [{record_name, user}, @@ -175,6 +184,8 @@ table_definitions() -> [{record_name, reverse_route}, {attributes, record_info(fields, reverse_route)}, {type, ordered_set}]}, + %% Consider the implications to nodes_of_type/1 before altering + %% the next entry. {rabbit_durable_exchange, [{record_name, exchange}, {attributes, record_info(fields, exchange)}, |