[erlang-questions] Mnesia tables don't finish syncing
Oliver Korpilla
Oliver.Korpilla@REDACTED
Thu Jun 1 11:15:32 CEST 2017
Hello.
I have a system with multiple nodes, one is central and the other start later and connect to central.
All tables are RAM copies, even schema.
On startup of the slave nodes I do:
1) Connect nodes
2) Spawn a process on central and do mnesia:add_table_copy for each table for my new node (including schema)
3) mnesia:wait_for_tables for all of these tables
I repeat steps 2) and 3) up to 5 times total with a wait time of 2s. In about 3% of cases (regression test run) it seems not to work no matter how long I wait.
What I see from step 2) is as expected, the calls to mnesia:add_table_copy return
a) {atomic, ok} on the first try
b) {aborted, {already_exists, <table>, <node>}} on all further tries
And no matter how many retries, in the failure scenarios the list of failed tables I still wait for does not get shorter.
Could people on this list please make further suggestions where I could look for faults? And how could I find them?
So far I have no way to pinpoint the actual error except that when I of course try to access such tables I get "badarg". But I don't see why the sync fails. How do I get more logs or a report pinpointing the actual problem?
Thank you and kind regards,
Oliver
More information about the erlang-questions
mailing list