[erlang-questions] Question about distributed mnesia behavior
cao.xu
cao.xu@REDACTED
Sat Apr 28 10:40:58 CEST 2012
Hi,
I am using mnesia recently under OTP R15B, and feel confused about some behavior of distributed mnesia.
I ran two nodes with sname 'test1' and 'test2', and then executed the following command "mnesia:create_schema(['test1', 'test2']), mnesia:create_table(test, [{disc_copies,['test1', 'test2']}]" on 'test1'. After that, I was able to use table 'test' on both nodes, everything seemed fine.
Then I shutdown these two nodes and restarted 'test2', the table 'test' was still accessible and I could read and write on it. But when I shutdown 'test2' and restarted 'test1', the table 'test' was unaccessible. The function wait_for_tables would timeout and operations on table 'test' would fail. Only if 'test2' is running, the table becomes accessible again on 'test1'.
I was wondering if this is an expected behavior, or the table should work properly on both nodes when they run alone.
BR
Xu Cao
More information about the erlang-questions
mailing list