couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Candler <>
Subject Re: What happens with a document, if a conflict is not resolved?
Date Sat, 31 Oct 2009 10:40:43 GMT
On Fri, Oct 30, 2009 at 08:37:36PM -0400, Adam Kocoloski wrote:
> I like where your head's at on this, Brian.  I should mention that it  
> *is* possible to retrieve all conflict revisions of a document with one 
> request:
> GET /db/bob?open_revs=all

Ah, that's a new one to me. I will update the wiki when I get a chance.

As Damian pointed out, you could implement resolve-on-get in a client layer
in front of CouchDB. The problem is, now I look over my own code, is that I
don't actually use a plain GET very much at all. Usually I fetch documents
via a view and multi-key fetch.

I tried _all_docs?conflicts=true and I didn't get the conflicts (I haven't
tried _all_docs?open_revs=all yet). Maybe this doesn't make sense until the
view itself can receive all revs and decide how to merge the conflicts.

> I think I'd be in favor of making the default GET include all conflicts, 
> but probably in the _conflicts field so as to minimize the changes to the 
> current API.

As a first step, that would be unlikely to break anyone, would make it clear
when a conflict exists, and would simplify the API by removing the need for
?conflicts=true. So I'd vote for that.



View raw message