Re: Mnesia behaviour during merge of table definitions

Dan Gudmundsson <[email protected]>
Newsgroups gmane.comp.lang.erlang.general
Message-ID <CANX4uuP+om2JEqnmoPwF_hYXvo=WRGgNH6PEY650ek9VOmptRA@mail.gmail.com>
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) <[email protected]> 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},'
> [email protected]'},{{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},'
> [email protected]'},{{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.
>
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.