为什么 Cloudant 中没有 all_or_nothing 支持?

Why there is no all_or_nothing support in Cloudant?

我尝试在 Cloudant 上将 all_or_nothing 设置为 true 进行原子批量文档更新,但得到以下响应:

    [{"id":"7b75974f73c4230047b96b5272b696fd","rev":"1-e9b78ecba4c4ac29a9743cd001219eae","error":"not_implemented","reason":"all_or_nothing is not supported yet"},
    {"id":"921faa913230839614a4feb19d5c39ec","rev":"0-","error":"not_implemented","reason":"all_or_nothing is not supported yet"}]

我关注 CouchDB documentation 因为 Cloudant 是 CouchDB 的一个分支,并且对于大多数用途来说它似乎是兼容的。在这种情况下不是。

所以我查看了 Cloudant documentation,确实那里根本没有提到 all_or_nothing 标志。 移动 Apache CouchDB 数据中未提及 到 Cloudant 白皮书。

现在我想知道.. 它是设计使然吗(如果以正确的 NoSQL 方式对数据建模,也许不需要它?是否有适用于此的最佳实践? ) 或者它 只是一个缺失的功能 ?

Cloudant 不支持 all_or_nothing 标志。当 CouchDB 分叉并成为 BigCouch 时,它被删除了。由于数据库被分片并存储在不同的机器上,因此在分布式系统中提供 all_or_nothing 保证会过于复杂,在分布式系统中,您的 _bulk_docs 请求最终会写入不同的分片。

如果我发现这也从即将推出的 CouchDB 2.0 中删除,我不会感到惊讶。