Mnesia behaviour during merge of table definitions

Dan Gudmundsson dangud@REDACTED
Fri Dec 11 09:42:21 CET 2020


Someone added indexes while the network was partitioned or at least when
mnesia thought the network was partitioned.
Use mnesia:set_master_nodes(GoodNodes) on the failing node, before starting
mnesia and then reset the master nodes afterwards.


On Fri, Dec 11, 2020 at 8:48 AM Vithya Shanmugam -X (vitshanm - SCARLET
WIRELESS INDIA PRIVATE LIMITED at Cisco) <vitshanm@REDACTED> wrote:

> 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/431b484b/attachment.htm>


More information about the erlang-questions mailing list