[erlang-questions] mnesia backup oddity

Lukas Larsson lukas@REDACTED
Tue Feb 26 16:45:48 CET 2008


Hi,

I've been playing around with mnesia:backup and noticed an oddity with
the data outputted by it. Let's say I have a table called myTable with
three elements. The mnesia:backup dump should look something like
this:

[{schema,myTable,
         [{name,myTable},
          {type,ordered_set},
          {ram_copies,[]},
          {disc_copies,['nonode@REDACTED'']},
          {disc_only_copies,[]},
          {load_order,0},
          {access_mode,read_write},
          {index,[]},
          {local_content,false},
          {record_name,myTable},
          {snmp,[{key,integer}]},
          {attributes,[key,data,datatwo]},
          {user_properties,[]},
          {frag_properties,[]},
          {cookie,{{1201,677139,173385},'nonode@REDACTED'}},
          {version,{{2,0},[]}}]}].
[{myTable,1,"mydata","mydata"},
 {myTable,2,"mydata2","mydata2"}].

This is what usually is outputted. Sometimes however I get the following:

[{schema,myTable,
         [{name,myTable},
          {type,ordered_set},
          {ram_copies,[]},
          {disc_copies,['nonode@REDACTED'']},
          {disc_only_copies,[]},
          {load_order,0},
          {access_mode,read_write},
          {index,[]},
          {local_content,false},
          {record_name,myTable},
          {snmp,[{key,integer}]},
          {attributes,[key,data,datatwo]},
          {user_properties,[]},
          {frag_properties,[]},
          {cookie,{{1201,677139,173385},'nonode@REDACTED'}},
          {version,{{2,0},[]}}]}].
[{myTable,1,"mydata","mydata"},
 {myTable,2,"mydata2","mydata2"}].
[{myTable,1},
 {myTable,2,"mydata2","mydata2"}].

The entry is duplicated and the first entry of the second list (I've
only seen this happen with two entries in the table) is only the table
name and the key. Does anyone have any idea about why I'm getting the
extra list in the backup file? The strangest thing is that it only
seems to be happening every once in a while, and not whenever I call
mnesia:backup.

Lukas
Erlang Training & Consulting Ltd



More information about the erlang-questions mailing list