|
Re: Bulk insert conflicts: msg#00138db.couchdb.devel
On Fri, Jul 25, 2008 at 11:16 AM, Michael Hendricks <michael-u4WEhoUc4zfYtjvyW6yDsg@xxxxxxxxxxxxxxxx> wrote: > The current bulk_docs behavior of failing the entire operation when one > part fails is a very useful feature though. It allows for limited > transactions. I use the bulk_docs feature to maintain the database in a > consistent state when I need to delete one document and create another > one. If either operation fails, I know that the entire bulk_docs > request will fail and the database will still be in a consistent state. > > Perhaps using something like this as the body of the 412 response: > > { > "ok":false, > "conflict_revs": [ > {"id": "0", "attempted_rev": "1001", "current_rev": "1002"}, > {"id": "2", "attempted_rev": "5000", "current_rev": "5002"} > ] > } > > I removed "conflicts":true since that can be inferred from the presence > of conflicted_revs. > > -- > Michael That's true, I didn't think about transactions. That's much more useful than following through with missing conflicted docs. I like your solution much better than mine, Michael. +1 |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [jira] Updated: (COUCHDB-95) HTTP/mochiweb failures when tested via Safari: 00138, Christopher Lenz (JIRA) |
|---|---|
| Next by Date: | [jira] Reopened: (COUCHDB-84) Reduce with group=true and count set to less than the # of returned rows, fails to close the json array: 00138, Chris Anderson (JIRA) |
| Previous by Thread: | Re: Bulk insert conflictsi: 00138, Michael Hendricks |
| Next by Thread: | [jira] Resolved: (COUCHDB-81) Design document not selectable from the top right select (on Opera 9.5): 00138, Christopher Lenz (JIRA) |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |