[erlang-questions] Mnesia Fragmented Tables, del_table_copy
Igor Ribeiro Sucupira
igorrs@REDACTED
Wed Jan 26 17:45:11 CET 2011
I haven't looked at it in detail, but I know it doesn't make much
sense to delete the second fragment (leaving no other copies of it) in
a table that has 4 fragments. It would break your fragmented table
(writing keys would not be possible in some cases).
Best regards.
Igor.
On Wed, Jan 19, 2011 at 11:31 AM, Tessaro Alexej <atessaro@REDACTED> wrote:
> Hello,
>
> I have started two communicating mnesia nodes and created one fragmented
> table with fragments stored in RAM only (no other replicas) and schema
> stored on disk on both nodes:
>
> node1 : constResourceData_frag3 (ram), constResourceData_frag4 (ram),
> schema (disk)
>
> node2 : constResourceData (ram), constResourceData_frag2 (ram), schema
> (disk)
>
> Now, from node1, I tried to call
> mnesia:del_table_copy(constResourceData_frag2, node2)
>
> but it fails saying:
>
> node1> Mnesia(node1): Last replica deleted in table
> constResourceData_frag2
> node1>{aborted,{no_exists,constResourceData_frag2,frag_properties,
> frag_hash}}
> node1> Mnesia(node1): Transaction {tid,75,<0.371.0>} calling
> #Fun<mnesia_schema.15.79614902> with [] failed:
> {aborted,{no_exists,constResourceData_frag2,frag_properties,frag_hash}}
>
> Looking at the mnesia_schema.erl source code, I found that the failure
> seems to happen when it tries to delete the "whole_table" in
> make_delete_table/2 and it runs the following check:
>
> %% Check if it is a base table
> nesia_frag:lookup_frag_hash(Tab),
>
> Why is my attempt of removing the fragment failing?
>
> My erlang version is R12B.
>
> Thank you
>
>
>
> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED
>
>
--
"The secret of joy in work is contained in one word - excellence. To
know how to do something well is to enjoy it." - Pearl S. Buck.
More information about the erlang-questions
mailing list