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

标签 indexing couchdb b-tree

据我了解,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/

相关文章:

database - 保持余额更新的数字总和的数据结构

sql - 访问每个标识符的最新行的正确方法?

c - 当 scanf() 稍后输入索引 "int arr[n];"时,为什么 "n"会导致我的程序挂起?

javascript - Map-Reduce 查询以计数标签

javascript - 包括设计文件工厂

algorithm - 如何最大化每个 btree 节点的元素数量

java - MiniMaxSum 通过了第一个测试用例,但因值较大而失败 (hackerrank)

lucene - Elasticsearch会在升级时自动更新Lucene索引吗?

在 couchdb 中搜索或通过 Elasticsearch 进行 river

c - 调用函数后指向 B 树根节点的指针开始指向子节点(应该继续指向根节点)