[erlang-questions] `mnesia:change_table_copy_type/3' issues when changing from disc to RAM
Francesco Mazzoli
f@REDACTED
Wed Aug 22 13:18:28 CEST 2012
Hi list,
For some reason, `mnesia:change_table_copy_type/3' fails when changing a table
replica type from ram to disc while some node containing a disc replica of the
same table is offline, with the error
{aborted, {not_active,
"All replicas on diskfull nodes are not active yet",
rabbit_user,
[hare@REDACTED]}}
where `rabbit_user' is the table in question, and `hare@REDACTED' is the offline
node that contains a disc replica. Note that there are other nodes with disc
replicas online.
Why does this happen? I've looked at `mnesia_schema.erl' and it seems to do
this check (in `ensure_active/2') when the type transition (in this case disc ->
RAM) is marked as `incompatible' by `compare_storage_type/3'.
One solutions would be to delete the local replica and then re-create it, but
that's inefficient and I'm still curious on why does the problem arise in the
first place.
--
Francesco * Often in error, never in doubt
More information about the erlang-questions
mailing list