[erlang-questions] Mnesia startup synchronization

Tino Breddin <>
Thu Jan 27 15:17:03 CET 2011


And you might find the 'setup' application useful for the separation of
installation and system startup.

See https://github.com/esl/setup

Tino

2011/1/27 Håkan Mattsson <>

> On Thu, Jan 27, 2011 at 11:06 AM, Andre Nathan <>
> wrote:
> > Hello
> >
> > In the "Erlang and OTP in Action" book, there's a section explaining
> > Mnesia dynamic replication, where a node copies the tables from other
> > cluster nodes (when there are any) or starts up on its own otherwise.
> >
> > In this section a race condition in this scheme is mentioned: two nodes
> > starting up simultaneously may believe that the other one was the first,
> > resulting in a deadlock where no initial schema is created.
> >
> > What would be a proper way to add synchronization to mnesia startup to
> > ensure that a single node is always the first to run?
>
> You should separate installation from normal startup. The installation is
> just run once and startup should assume that the schema is created.
>
> /Håkan
>
> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:
>
>


More information about the erlang-questions mailing list