liqipeng commented on issue #1880:
URL: https://github.com/apache/fury/issues/1880#issuecomment-2409018593

   > Currently, SCHEMA_CONSISTENT and COMPATIBLE modes are completely 
incompatible. I think that COMPATIBLE mode keep compatible with 
SCHEMA_CONSISTENT mode maybe necessary, so that SCHEMA_CONSISTENT mode can be 
easily switched to SCHEMA_CONSISTENT mode when the need for SCHEMA changes 
occurs.
   
   @chaokunyang 
不好意思,可能蹩脚英文没说清楚,我想表达的是可以考虑一种单向的兼容,仅支持从SCHEMA_CONSISTENT迁移至COMPATIBLE即可。因为可能schema设计者一开始考虑不够充分使用了SCHEMA_CONSISTENT,后来有需求增加字段,他可以将模式切换为兼容模式来实现需求。
   
   
对fury底层原理暂不了解,先猜测假设一下,如果实现这种单向模式的兼容,不需要对fury底层做变更,更多是api层面的兼容,当选择COMPATIBLE模式执行反序列化时先探测一下二进制数据的模式(假定有相应的标识字段),如果实际数据是来自SCHEMA_CONSISTENT则正常按SCHEMA_CONSISTENT反序列化即可。
   
   
这样的兼容是可以提高fury的易用性的。目前默认为SCHEMA_CONSISTENT,如果初级使用者没深入理解这两种模式的差异是很容易做出错误决策的,当前两种模式完全不支持迁移会导致切换模式成本很高。


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org
For additional commands, e-mail: commits-h...@fury.apache.org

Reply via email to