couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bob Dionne (Resolved) (JIRA)" <>
Subject [jira] [Resolved] (COUCHDB-911) Concurrent updates to the same document generate erroneous conflict messages
Date Fri, 18 Nov 2011 20:42:52 GMT


Bob Dionne resolved COUCHDB-911.

    Resolution: Fixed
      Assignee: Bob Dionne

Add references to docs to prevent dups from being collapsed

Bulk docs requests may have duplicates or multiple docs with the same id.
These were being collapsed in a dictionary as messages are passed from
merge_rev_trees in couch_db_updater to collect_results in couch_db.
Attaching a reference allows each to be processed correctly.
> Concurrent updates to the same document generate erroneous conflict messages
> ----------------------------------------------------------------------------
>                 Key: COUCHDB-911
>                 URL:
>             Project: CouchDB
>          Issue Type: Bug
>          Components: HTTP Interface
>    Affects Versions: 1.0
>         Environment: Cloudant BigCouch EC2 node
>            Reporter: Jay Nelson
>            Assignee: Bob Dionne
>            Priority: Minor
>             Fix For: 1.2
>         Attachments: 0001-Add-test-test-etap-074-doc-update-conflicts.t.patch, 0001-Add-test-test-etap-074-doc-update-conflicts.t.patch,
0001-Fix-whitespace.patch, 0002-Failing-test-for-duplicates-in-bulk-docs.patch, 0003-Add-references-to-docs-to-prevent-dups-from-being-co.patch
>   Original Estimate: 48h
>  Remaining Estimate: 48h
> Repeating an "_id" in a _bulk_docs post data file results in both entries being reported
as document conflict errors.  The first occurrence actual inserts into the database, and only
the second occurrence should report a conflict.
> curl -d '{ "docs": [ {"_id":"foo"}, {"_id","foo"} ] }' -H 'Content-Type:application/json'
> [{"id":"foo","error":"conflict","reason":"Document update conflict."},{"id":"foo","error":"conflict","reason":"Document
update conflict."}]
> But the database shows that one new document was actually inserted.
> Only the second occurrence should report conflict.  The first occurrence should report
the "_rev" property of the newly inserted doc.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message