[erlang-questions] Tracking progress of mnesia start

Karolis Petrauskas k.petrauskas@REDACTED
Mon Mar 6 17:06:42 CET 2017


I use mnesia:wait_for_tables/2 in a loop with small timeout for that.
This function returns a list of missing tables in the case of timeout.


On Mon, Mar 6, 2017 at 5:38 PM, Attila Rajmund Nohl
<attila.r.nohl@REDACTED> wrote:
> Hello!
> I'd like to provide feedback to the user when mnesia is started in out
> application (something like "4 out of 16 tables loaded"). My first
> idea was to mnesia:subscribe for events, but I can subscribe only
> after mnesia is started, so I might miss some tables. My second idea
> is to turn on debugging, add an event module (both via setting
> environment values). It kind of works, I receive events like
> {mnesia_system_event,
>              {mnesia_info,
>                  "Table ~w is loaded on ~w. s=~w, r=~w, lc=~w, f=~w, m=~w~n",
>                  [album,'c3@REDACTED',ram_copies,nowhere,false,false,false]}},
> but it depends on the format of debugging message and even though this
> message hasn't changed in the last 7 years, I'm a bit uneasy about it.
> Do you have any better idea?
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions

More information about the erlang-questions mailing list