Mnesia behaviour during merge of table definitions

Vithya Shanmugam -X (vitshanm - SCARLET WIRELESS INDIA PRIVATE LIMITED at Cisco) vitshanm@REDACTED
Fri Dec 11 06:56:08 CET 2020


Hi,

In a cluster, during mnesia startup in one of the nodes, it fails to merge table definitions for some table replicas and fails to start.

=ERROR REPORT==== 15-Nov-2020::01:37:47 ===
Mnesia ** ERROR ** ** FATAL ** Failed to merge schema: Cannot merge definitions of table 'alternatesConfiguration|564D8EAD0A6C1F9BF00BF146A46A04F0'.
Local = {cstruct,'alternatesConfiguration|564D8EAD0A6C1F9BF00BF146A46A04F0',set,[],['clusterdb@*.*.*.*','clusterdb@*.*.*.*',..]
,[],[],0,read_write,false,[],[],false,alternatesConfiguration,[uuid,ip_address,cdb_address,index],[],[],[],{{1604409629078965299,-576460752303420079,1},'clusterdb@REDACTED'},{{222,0},{'clusterdb@*.*.*.*',{1605,393466,670334}}}},
Remote = {cstruct,'alternatesConfiguration|564D8EAD0A6C1F9BF00BF146A46A04F0',set,[],['clusterdb@*.*.*.*','clusterdb@*.*.*.*',...]
,[],[],0,read_write,false,[{3,ordered},{4,ordered},{5,ordered}],[],false,alternatesConfiguration,[uuid,ip_address,cdb_address,index],[],[],[],{{1604409629078965299,-576460752303420079,1},'clusterdb@REDACTED'},{{212,0},{'clusterdb@*.*.*',{1605,313445,524160}}}}

Normally, schema merge fails when cookies differ between the table replicas, but in this case, the cookies seem to match. Looking at the mnesia code "mnesia_schema.erl", the error occurs whenever there's a mismatch in some of the table properties and from the error report, index properties of the local and remote replica of 'alternatesConfiguration' table differs during the time of merge. Local replica has an empty list for index whereas the remote replica has [\{3,ordered},\{4,ordered},\{5,ordered}] and there's a difference in version too.

Is it normal that this happens when the network is partitioned or there's something wrong with the mnesia table or is there something that I'm missing to understand?

The question is, Under which scenarios this is likely to happen? Thanks.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20201211/86505692/attachment.htm>


More information about the erlang-questions mailing list