gpt4 book ai didi

indexing - couchdb 如何检索所有以前的修订版?

转载 作者:行者123 更新时间:2023-12-04 14:05:24 24 4
gpt4 key购买 nike

据我了解,CouchDB 的 Btree 实现实际上使用了 Shadowing 技术,每次更新都会产生新的 root,以下摘录自此 PDF (看起来实现了比传统阴影更好的算法)。

Shadowing means that to update an on-disk page, the entire page is read into memory, modified, and later written to disk at an alternate location. When a page is shadowed its location on disk changes, this creates a need to update (and shadow) the immediate ancestor of the page with the new address. Shadowing propagates up to the file system root.



couchdb 如何尽可能地实现获取所有叶修订(因为某些修订已通过压缩过程删除)?沙发内部是否存储了一个指向以前版本的指针?

谢谢

最佳答案

Couch 不保证可以检索文档的旧版本:

The terms version and revision might sound familiar (if you are programming without version control, drop this book right now and start learning one of the popular systems). Using new versions for document changes works a lot like version control, but there’s an important difference: CouchDB does not guarantee that older versions are kept around.



资料来源:O'Reilly CouchDB 权威指南,第 40 页。

为什么是这样?因为 CouchDB 不是版本控制系统 :版本控制机制用于并发访问数据库。权威指南在第 14-15 页上涉及到这一点。

关于indexing - couchdb 如何检索所有以前的修订版?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6440590/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com