[erlang-questions] Mnesia inconsistency with R11B-1

Fredrik Thulin <>
Fri Sep 29 14:15:45 CEST 2006


Hi

I upgraded from R10B-10 to R11B-1 about a week ago. Today I got a 
problem report that seems to be because I have inconsistencies in my 
Mnesia table 'phone'.

On node #1, a record is present that is not present on node #2 :

  ()49> rpc:call('', phone,  
     get_sipuser_locations, ["username"]).
  {ok,[{siplocationdb_e,{sipurl,"sip",
     ...
                        1159532776}]}

  ()50> rpc:call('', phone, 
     get_sipuser_locations, ["username"]).
  {ok,[]}
  ()51>  

This table is written to from at least four different nodes, but always 
using transactions and never with dirty writes. What should I do to 
figure out the cause of this? I will have to restart the nodes at the 
latest before Monday morning to get everything working again, but if 
you guys are quick I can do diagnostics on the running system =).

It seems to me that there is no partitioned network (both nodes list the 
same nodes as 'running').

Another indicator of the differences, and also mnesia:info() output from 
the two nodes :

()55> length( rpc:call('', db_util, 
tab_to_list, [phone]) ).
63
()56> length( rpc:call('', db_util, 
tab_to_list, [phone]) ).
58
()57> rpc:call('', mnesia, info, []).
---> Processes holding locks <---
---> Processes waiting for locks <---
---> Participant transactions <---
---> Coordinator transactions <---
---> Uncertain transactions <---
---> Active tables <---
schema         : with 10       records occupying 1569     words of mem
call           : with 0        records occupying 279      words of mem
===> System info in version "4.3.2", debug level = none <===
opt_disc. Directory "/var/yxa/mnesia/appserver" is NOT used.
use fallback at restart = false
running db nodes   = 
['','','','','','','','','','','']
stopped db nodes   = ['','']
master node tables = []
remote             = [cpl_script_graph,
                      eventdata,
                      forward,
                      gruu,
                      numbers,
                      phone,
                      regexproute,
                      user]
ram_copies         = [call,schema]
disc_copies        = []
disc_only_copies   = []
[{'',ram_copies},
{'',ram_copies}] = [call]
[{'',ram_copies},
 {'',ram_copies},
 {'',ram_copies},
 {'',ram_copies},
 {'',disc_copies},
 {'',disc_copies},
 {'',ram_copies},
 {'',ram_copies},
 {'',ram_copies},
 {'',ram_copies},
 {'',ram_copies}] = [schema]
[{'',ram_copies},
 {'',ram_copies},
 {'',disc_copies},
 {'',disc_copies}] = [eventdata]
[{'',disc_copies},
 {'',disc_copies}] = [gruu,
                                              cpl_script_graph,
                                              regexproute,
                                              phone,
                                              forward,
                                              numbers,
                                              user]
93 transactions committed, 0 aborted, 9 restarted, 0 logged to disc
0 held locks, 0 in queue; 0 local transactions, 0 remote
0 transactions waits for other nodes: []
ok
()58> rpc:call('', mnesia, info, []).
---> Processes holding locks <---
---> Processes waiting for locks <---
---> Participant transactions <---
---> Coordinator transactions <---
---> Uncertain transactions <---
---> Active tables <---
schema         : with 10       records occupying 1569     words of mem
call           : with 0        records occupying 279      words of mem
===> System info in version "4.3.2", debug level = none <===
opt_disc. Directory "/var/yxa/mnesia/appserver" is NOT used.
use fallback at restart = false
running db nodes   = 
['','','','','','','','','','','']
stopped db nodes   = ['','']
master node tables = []
remote             = [cpl_script_graph,
                      eventdata,
                      forward,
                      gruu,
                      numbers,
                      phone,
                      regexproute,
                      user]
ram_copies         = [call,schema]
disc_copies        = []
disc_only_copies   = []
[{'',ram_copies},
{'',ram_copies}] = [call]
[{'',ram_copies},
 {'',ram_copies},
 {'',ram_copies},
 {'',ram_copies},
 {'',disc_copies},
 {'',disc_copies},
 {'',ram_copies},
 {'',ram_copies},
 {'',ram_copies},
 {'',ram_copies},
 {'',ram_copies}] = [schema]
[{'',ram_copies},
 {'',ram_copies},
 {'',disc_copies},
 {'',disc_copies}] = [eventdata]
[{'',disc_copies},
 {'',disc_copies}] = [gruu,
                                              cpl_script_graph,
                                              regexproute,
                                              phone,
                                              forward,
                                              numbers,
                                              user]
759 transactions committed, 0 aborted, 0 restarted, 0 logged to disc
0 held locks, 0 in queue; 0 local transactions, 0 remote
0 transactions waits for other nodes: []
ok
()59>                          

/Fredrik



More information about the erlang-questions mailing list