[erlang-questions] RFC: mnesia majority checking

Ulf Wiger ulf.wiger@REDACTED
Sat Dec 11 12:38:56 CET 2010


On 11 Dec 2010, at 12:26, Ulf Wiger wrote:

> OTOH, this worked:
> - start mnesia on N1 with a disk schema
> - start N2 with {extra_db_nodes,[N1]}
> - run mnesia:change_table_copy_type(schema,N2,disc_copies)
> - start N3 the same way
> - kill N1
> - change N3's schema to disc_copies
> 
> And after this, I was able to add a replica for a table on N3, even 
> though it had a replica on N1 and N1 was down. So it is not 
> entirely clear under which conditions mnesia decides to be conservative
> about schema changes, and why.
> 
> (BTW, once I started N1 again, mnesia dumped core due to a combine
> error, so it would seem as if some conservatism is well warranted. :)


Oh, I forgot to mention that after having added the (ram_copies) replica
on N3, I started N1 again, then stopped N1, then went in on N3 and 
changed its copy to disc_copies. I believe this is what caused the 
problem, because the schema merge effectively instructed N1 to 
create both a ram copy and a disc copy for N3 on the same table - and 
this is not allowed.

I guess it's possible to spin this into an argument for majority checking
on mnesia ops and subsequent merges. :)

BR,
Ulf

Ulf Wiger, CTO, Erlang Solutions, Ltd.
http://erlang-solutions.com





More information about the erlang-questions mailing list