升压序列化库升级 [英] Boost Serialization Library upgrade
问题描述
我怎么知道,我可以放心地升级升压串行化库在生产系统不中断与现有数据的兼容性?有没有办法,我应该按顺序执行,以确保存储在库中的previous版本的二进制格式的所有数据都将被新的成功读取任何测试?难道升压序列化库本身保证版本之间的某种兼容性?
How do I know that I can safely upgrade Boost Serialization Library on a production system without breaking compatibility with the existing data ? Is there any test that I should perform in order to be sure that all data stored in the binary format by previous version of the library will be successfully read by the new one ? Does Boost Serialization library itself guarantee some sort of compatibility between versions ?
推荐答案
Boost.serialization是向后兼容的,但是的是的不的保证是向前兼容。
Boost.serialization is backward-compatible but is not guaranteed to be forwards compatible.
这意味着:
- 您可以创建boost.serialization的旧版本,可以用较新的版本可以读取的档案。
- 有没有保证与boost.serialization的较新版本创建的归档文件将是可读的由年长的。
如果您发送客户端和双向服务器之间的邮件,例如,你可能必须步调一致升级提振的版本上都。
If you send messages between a client and a server in both directions, for instance, you may have to upgrade the version of boost on both in lockstep.
在'线格式'不的每个的改变提升的版本。所以升压2特定版本之间,你可能没有任何问题 - 我无法找到它的归档文件格式的版本是哪个版本升压内使用特定的文档
The 'wire format' does not change with every version of boost. So between 2 specific versions of boost, you may have no problem - I can't find specific documentation of which version of the archive format is used within which version of boost.
还要注意保持向后兼容性'保证',这只是前pressing意图 - 尽管我猜你会得到你的钱;-)。升压版本1.42和1.43有后来这意味着版本无法读取他们回来的错误 - 见1.45发行说明。
Note also that while backwards compatibility is 'guaranteed', that's just expressing an intent - although I guess you could get your money back ;-). Boost versions 1.42 and 1.43 had a bug that meant later versions cannot read them back - see the 1.45 release notes.
这篇关于升压序列化库升级的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!