[erlang-questions] How to get the mnesia master node ?
Ulf Wiger (TN/EAB)
ulf.wiger@REDACTED
Mon Sep 11 17:48:04 CEST 2006
Read the Mnesia User's Guide - 6.7 Recovery from Communication Failure.
http://www.erlang.org/doc/doc-5.5/lib/mnesia-4.3.1/doc/html/Mnesia_chap7.html#6.7
"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:
(ts2@REDACTED)16> mnesia:table_info(joe, where_to_write).
[ts2@REDACTED]
(ts2@REDACTED)17> mnesia:table_info(joe, where_to_read).
ts2@REDACTED
BR,
Ulf W
> -----Original Message-----
> From: erlang-questions-bounces@REDACTED
> [mailto:erlang-questions-bounces@REDACTED] On Behalf Of
> Jérôme Sautret
> Sent: den 11 september 2006 16:40
> To: erlang-questions-posters@REDACTED
> Cc: jerome.sautret@REDACTED
> 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 ?
>
> Thanks,
> Jérôme
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
More information about the erlang-questions
mailing list