Hazelcast:可移植序列化:具有相同 class-id 的不兼容 class-定义
Hazelcast : Portable Serialization : Incompatible class-definitions with same class-id
我最近将集群从 3.7.2 升级到 3.9.2;关闭所有盒子。
我正在使用可移植序列化,配置文件中的当前版本号是 6。然而,冷启动后,集群指示不兼容的 class 定义。
此后我已经多次重启集群,但仍然存在相同的错误。
为什么class的版本已经升级了,系统在某些class中的某些字段仍然不同步?
日志:
Caused by:
com.hazelcast.nio.serialization.HazelcastSerializationException:
Incompatible class-definitions with same class-id:
ClassDefinition{factoryId=1, classId=8, version=6, fieldDefinitions=[
FieldDefinitionImpl{index=0, fieldName='feature', type=UTF, classId=0, factoryId=0, version=6},
FieldDefinitionImpl{index=1, fieldName='value', type=BOOLEAN, classId=0, factoryId=0, version=6}]}
VS
ClassDefinition{factoryId=1, classId=8, version=6, fieldDefinitions=[
FieldDefinitionImpl{index=0, fieldName='feature', type=UTF, classId=0, factoryId=0, version=0},
FieldDefinitionImpl{index=1, fieldName='value', type=BOOLEAN, classId=0, factoryId=0, version=0}]}
配置:
<serialization>
<portable-version>6</portable-version>
<portable-factories>
<portable-factory factory-id="1">
com.MyPortableFactory
</portable-factory>
</portable-factories>
</serialization>
这是 Hazelcast 库中的一个错误,已在 3.9.4 和 3.10+ 中修复。
问题:
https://github.com/hazelcast/hazelcast/issues/12733
针对 3.10 的修复:
https://github.com/hazelcast/hazelcast/pull/12734
针对 3.9.4 的修复:
https://github.com/hazelcast/hazelcast/pull/12735
我最近将集群从 3.7.2 升级到 3.9.2;关闭所有盒子。
我正在使用可移植序列化,配置文件中的当前版本号是 6。然而,冷启动后,集群指示不兼容的 class 定义。
此后我已经多次重启集群,但仍然存在相同的错误。
为什么class的版本已经升级了,系统在某些class中的某些字段仍然不同步?
日志:
Caused by:
com.hazelcast.nio.serialization.HazelcastSerializationException:
Incompatible class-definitions with same class-id:
ClassDefinition{factoryId=1, classId=8, version=6, fieldDefinitions=[
FieldDefinitionImpl{index=0, fieldName='feature', type=UTF, classId=0, factoryId=0, version=6},
FieldDefinitionImpl{index=1, fieldName='value', type=BOOLEAN, classId=0, factoryId=0, version=6}]}
VS
ClassDefinition{factoryId=1, classId=8, version=6, fieldDefinitions=[
FieldDefinitionImpl{index=0, fieldName='feature', type=UTF, classId=0, factoryId=0, version=0},
FieldDefinitionImpl{index=1, fieldName='value', type=BOOLEAN, classId=0, factoryId=0, version=0}]}
配置:
<serialization>
<portable-version>6</portable-version>
<portable-factories>
<portable-factory factory-id="1">
com.MyPortableFactory
</portable-factory>
</portable-factories>
</serialization>
这是 Hazelcast 库中的一个错误,已在 3.9.4 和 3.10+ 中修复。
问题:
https://github.com/hazelcast/hazelcast/issues/12733
针对 3.10 的修复:
https://github.com/hazelcast/hazelcast/pull/12734
针对 3.9.4 的修复:
https://github.com/hazelcast/hazelcast/pull/12735