为什么Cloudant中没有all_or_nothing支持? [英] Why there is no all_or_nothing support in Cloudant?

查看:56
本文介绍了为什么Cloudant中没有all_or_nothing支持?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在Cloudant上使用 all_or_nothing 设置为 true 进行原子批量文档更新,但是得到了以下内容响应:

  [{ id: 7b75974f73c4230047b96b5272b696fd, rev: 1-e9b78ecba4c4ac29a9743cd001219eae,错误:  not_implemented,原因:尚不支持all_or_nothing},
{ id: 921faa913230839614a4feb19d5c39ec, rev: 0-,错误: not_implemented,原因 :尚不支持all_or_nothing}]

我关注了 CouchDB文档,因为Cloudant是CouchDB的分支,并且对于大多数用途,它似乎是兼容的。



所以我调查了 Cloudant文档,实际上根本没有提到 all_or_nothing 标志。在将Apache CouchDB数据
移至Cloudant中未提及白皮书。



现在我想知道.. 这是设计使然吗(如果按正确的NoSQL方式对数据进行建模,也许就不需要了?)是否有任何适用于此的最佳做法?)还是只是缺少的功能

解决方案

< Cloudant不支持code> all_or_nothing 标志。当CouchDB被派生并成为BigCouch时,将其删除。由于将数据库分片并存储在单独的计算机上,因此要在分布式系统中提供 all_or_nothing 保证,将变得过于复杂,因为您的_bulk_docs请求最终将写入单独的分片。 / p>

发现即将发布的CouchDB 2.0也删除了它,我不会感到惊讶。


I tried to make an atomic bulk documents update with all_or_nothing set to true on Cloudant, but got the following response:

    [{"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"}]

I followed CouchDB documentation because Cloudant is a fork of CouchDB and for most uses it seems to be compatible. Not in this case.

So I looked into Cloudant documentation and indeed the all_or_nothing flag is not mentioned there at all. It is not mentioned in Moving Apache CouchDB Data to Cloudant white paper either.

Now I wonder.. is it by design (maybe it shouldn't be needed if data is modeled the proper NoSQL way? Are there any best practices that apply here?) or is it just a missing feature?

解决方案

The all_or_nothing flag is not supported on Cloudant. It was removed when CouchDB was forked and became BigCouch. As the databases is sharded and stored on separate machines, it would be be overcomplicated to provide all_or_nothing guarantees in a distributed system, where your _bulk_docs requests ends up writing to separate shards.

I wouldn't be surprised to find that this is removed from the forthcoming CouchDB 2.0 aswell.

这篇关于为什么Cloudant中没有all_or_nothing支持?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆