Hello Ilya, 
Our approach is not to empty binary_meta directory, because if you empty this 
directory, the data of all tables may be lost.
 We use the cat *.bin file to find the specific bin file of a table, and  then 
delete it on all nodes. After this operation, the following error  appears.
 We don't want to lose all the data. It's acceptable to rebuild only one table.



------------------ ???????? ------------------
??????:                                                                         
                                               "user"                           
                                                         
<[email protected]&gt;;
????????:&nbsp;2021??4??1??(??????) ????11:24
??????:&nbsp;"user"<[email protected]&gt;;

????:&nbsp;Re: [2.10]Binary type has different affinity key fields



Hello!

I guess you have to wipe this directory on all nodes, including clients. If any 
caches contain old instances of this class, drop the caches before restart.


Regards,
-- 

Ilya Kasnacheev









????, 1 ??????. 2021 ??. ?? 08:03, 38797715 <[email protected]&gt;:

                   
Hello,
         Ignite turns on native persistence,3 nodes.
         We changed the name of the table primary key (unexpected         
operation), as follows:
     
CREATE TABLE WORKSPACE (
         &nbsp;&nbsp;&nbsp; NAME VARCHAR,
         &nbsp;&nbsp;&nbsp; WORKSPACEID VARCHAR,
         &nbsp;&nbsp;&nbsp; PRIMARY KEY (WORKSPACEID)
         ) WITH "template=cache-replicated, cache_name=Workspace,         
key_type=WorkspaceKey,value_type=Workspace";
     
INSERT ....
     
DROP TABLE WORKSPACE
     
then:
     
     
CREATE TABLE WORKSPACE (
         &nbsp;&nbsp;&nbsp; NAME VARCHAR,
         &nbsp;&nbsp;&nbsp; ID VARCHAR,
         &nbsp;&nbsp;&nbsp; PRIMARY KEY (ID)
         ) WITH "template=cache-replicated, cache_name=Workspace,         
key_type=WorkspaceKey,value_type=Workspace";
     
At this time, you will find that the data         cannot be written 
(affinitykey conflict error).
     
Next, delete the file in the binary_meta         directory.
       
     
At this time, start a client node, and the         following error will be 
thrown:
     
What I want to ask is, is there a recommended standard operation       
procedure for such an operation error to make the cluster return       to 
normal?
     
     Caused by: org.springframework.beans.BeanInstantiationException: Failed to 
instantiate [org.apache.ignite.Ignite]: Factory method 'ignite' threw 
exception; nested exception is class org.apache.ignite.IgniteCheckedException: 
New binary metadata is incompatible with binary metadata persisted locally. 
Consider cleaning up persisted metadata from <workDir&gt;/db/binary_meta 
directory.
    at 
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
 ~[spring-beans-5.2.9.RELEASE.jar!/:5.2.9.RELEASE]
    at 
org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:650)
 ~[spring-beans-5.2.9.RELEASE.jar!/:5.2.9.RELEASE]
    ... 44 common frames omitted
Caused by: org.apache.ignite.IgniteCheckedException: New binary metadata is 
incompatible with binary metadata persisted locally. Consider cleaning up 
persisted metadata from <workDir&gt;/db/binary_meta directory.
    at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:1455) 
~[ignite-core-2.10.0.jar!/:2.10.0]
    at 
org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:2112)
 ~[ignite-core-2.10.0.jar!/:2.10.0]
    at 
org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1758)
 ~[ignite-core-2.10.0.jar!/:2.10.0]
    at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1143) 
~[ignite-core-2.10.0.jar!/:2.10.0]
    at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:641) 
~[ignite-core-2.10.0.jar!/:2.10.0]
    at org.apache.ignite.IgniteSpring.start(IgniteSpring.java:66) 
~[ignite-spring-2.10.0.jar!/:2.10.0]
Caused by: org.apache.ignite.binary.BinaryObjectException: New binary metadata 
is incompatible with binary metadata persisted locally. Consider cleaning up 
persisted metadata from <workDir&gt;/db/binary_meta directory.
    at 
org.apache.ignite.internal.processors.cache.binary.CacheObjectBinaryProcessorImpl.addMetaLocally(CacheObjectBinaryProcessorImpl.java:698)
 ~[ignite-core-2.10.0.jar!/:2.10.0]
    at 
org.apache.ignite.internal.processors.cache.binary.CacheObjectBinaryProcessorImpl$1.addMetaLocally(CacheObjectBinaryProcessorImpl.java:297)
 ~[ignite-core-2.10.0.jar!/:2.10.0]
    at 
org.apache.ignite.internal.binary.BinaryContext.registerUserClassDescriptor(BinaryContext.java:826)
 ~[ignite-core-2.10.0.jar!/:2.10.0]
    at 
org.apache.ignite.internal.binary.BinaryContext.registerDescriptor(BinaryContext.java:784)
 ~[ignite-core-2.10.0.jar!/:2.10.0]
    at 
org.apache.ignite.internal.binary.BinaryContext.registerClass(BinaryContext.java:581)
 ~[ignite-core-2.10.0.jar!/:2.10.0]
    at 
org.apache.ignite.internal.processors.query.GridQueryProcessor.registerTypeLocally(GridQueryProcessor.java:1284)
 ~[ignite-core-2.10.0.jar!/:2.10.0]
    at 
org.apache.ignite.internal.processors.query.GridQueryProcessor.registerBinaryMetadata(GridQueryProcessor.java:1181)
 ~[ignite-core-2.10.0.jar!/:2.10.0]
    at 
org.apache.ignite.internal.processors.query.GridQueryProcessor.registerMetadataForRegisteredCaches(GridQueryProcessor.java:1143)
 ~[ignite-core-2.10.0.jar!/:2.10.0]
    at 
org.apache.ignite.internal.processors.query.GridQueryProcessor.onCacheKernalStart(GridQueryProcessor.java:330)
 ~[ignite-core-2.10.0.jar!/:2.10.0]
    at 
org.apache.ignite.internal.processors.cache.GridCacheProcessor.onKernalStart(GridCacheProcessor.java:677)
 ~[ignite-core-2.10.0.jar!/:2.10.0]
    at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:1407) 
~[ignite-core-2.10.0.jar!/:2.10.0]
    ... 61 common frames omitted
Caused by: org.apache.ignite.binary.BinaryObjectException: Binary type has 
different affinity key fields [typeName=WorkspaceKey, affKeyFieldName1=ID, 
affKeyFieldName2=null]
    at 
org.apache.ignite.internal.binary.BinaryUtils.mergeMetadata(BinaryUtils.java:999)
 ~[ignite-core-2.10.0.jar!/:2.10.0]
    at 
org.apache.ignite.internal.binary.BinaryUtils.mergeMetadata(BinaryUtils.java:959)
 ~[ignite-core-2.10.0.jar!/:2.10.0]
    at 
org.apache.ignite.internal.processors.cache.binary.CacheObjectBinaryProcessorImpl.addMetaLocally(CacheObjectBinaryProcessorImpl.java:690)
 ~[ignite-core-2.10.0.jar!/:2.10.0]
    ... 71 common frames omitted

Reply via email to