Why there is no all_or_nothing support in Cloudant?

自古美人都是妖i 提交于 2019-12-04 05:02:58

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/29554887/why-there-is-no-all-or-nothing-support-in-cloudant

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!