fury icon indicating copy to clipboard operation
fury copied to clipboard

How to upgrade system after updated entity classes

Open AprilWind123 opened this issue 11 months ago • 2 comments

Search before asking

  • [x] I had searched in the issues and found no similar issues.

Version

对象缓存到 redis 了,然后我新增了一个字段,就没办法反序列化了

Component(s)

Java

Minimal reproduce step

如果系统修改了实体类,更新系统的时候,就需要统一删除缓存

What did you expect to see?

确实是个大问题,代表着只能停机更新系统,然后清除缓存

What did you see instead?

如果是大项目的话,显然不能这样做

Anything Else?

No response

Are you willing to submit a PR?

  • [ ] I'm willing to submit a PR!

AprilWind123 avatar Jan 17 '25 07:01 AprilWind123

Please refer this document to set compatible mode.

Fury compatible Mode supports deserialize classes with inconsistent schema. i.e. you can update entity class like adding/deleting fields, and fury can still succeed in deserializing data .

chaokunyang avatar Jan 17 '25 11:01 chaokunyang

FYI, We have s separate section https://fury.apache.org/docs/guide/java_object_graph_guide#handling-class-schema-evolution-in-serialization for class schema changes @AprilWind123

chaokunyang avatar Feb 07 '25 07:02 chaokunyang