[erlang-questions] How to get the mnesia master node ?
Ulf Wiger (TN/EAB)
Mon Sep 11 17:48:04 CEST 2006
Read the Mnesia User's Guide - 6.7 Recovery from Communication Failure.
"The functions mnesia:system_info(master_node_tables) and mnesia:table_info(Tab, master_nodes) may be used to obtain information about the potential master nodes."
Mnesia doesn't use master nodes in normal operation. If master nodes are set, it's because the user did so. The master node setting overrides the default behaviour of mnesia to select whichever copy appears most recent.
But perhaps that's not the information you're after? If you want to know where mnesia intends to fetch data for a given table, this is perhaps more relevant:
()16> mnesia:table_info(joe, where_to_write).
()17> mnesia:table_info(joe, where_to_read).
> -----Original Message-----
> [mailto:] On Behalf Of
> Jérôme Sautret
> Sent: den 11 september 2006 16:40
> Subject: [erlang-questions] How to get the mnesia master node ?
> Hello all,
> How can I get the master node on a mnesia cluster ? Or how
> can I now if the current node is currently the master or not ?
> erlang-questions mailing list
More information about the erlang-questions