Why there is no all_or_nothing support in Cloudant?
Asked Answered
O

1

1

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?

Ormand answered 10/4, 2015 at 6:35 Comment(0)
L
5

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.

Leandra answered 5/5, 2015 at 7:51 Comment(1)
Thanks, I read this as "it's by design". Could you please provide some links to documentation or other Cloudant resources that would back up that statement or it is just your opinion? I created this question because it was so hard to find anything on that topic, so any links are appreciated.Ormand

© 2022 - 2024 — McMap. All rights reserved.