|
Bulk insert conflicts: msg#00132db.couchdb.devel
I just recently filed a bug for couchdb's error reporting on conflicts with bulk insert: https://issues.apache.org/jira/browse/COUCHDB-97 For the moment, the error couch is giving is {"error":"conflict","reason":"Update conflict"}. When PUTing a single document, this isn't that bad. When bulk inserting thousands of documents, this isn't helpful in the least. I would like to propose a solution to this. The current success message for bulk docs looks like this: { "ok":true, "new_revs": [ {"id": "0", "rev": "3682408536"}, {"id": "1", "rev": "3206753266"}, {"id": "2", "rev": "426742535"} ] } If there are any confllicts, I suggest that it would look something like this: { "ok":true, "conflicts":true, "new_revs": [ {"id": "1", "rev": "12345"}, {"id": "3", "rev": "23456"}, {"id": "4", "rev": "34567"} ] "conflict_revs": [ {"id": "0", "attempted_rev": "1001", "current_rev": "1002"}, {"id": "2", "attempted_rev": "5000", "current_rev": "5002"} ] } This way, not only do you know which documents had conflicts, but the entire bulk operation does not have to fail. What do you all think? -Gilbert |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [jira] Updated: (COUCHDB-50) Compaction throws error and makes web un-reachable and erlang terminates: 00132, Christopher Lenz (JIRA) |
|---|---|
| Next by Date: | [jira] Resolved: (COUCHDB-81) Design document not selectable from the top right select (on Opera 9.5): 00132, Christopher Lenz (JIRA) |
| Previous by Thread: | [jira] Updated: (COUCHDB-50) Compaction throws error and makes web un-reachable and erlang terminatesi: 00132, Christopher Lenz (JIRA) |
| Next by Thread: | Re: Bulk insert conflicts: 00132, Chris Anderson |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |