Uploaded image for project: 'CouchDB'
  1. CouchDB
  2. COUCHDB-911

Same ocurrence of a document in _bulk_docs generates erroneous conflict messages

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0
    • Fix Version/s: 1.2, 1.3
    • Component/s: HTTP Interface
    • Labels:
      None
    • Environment:

      Cloudant BigCouch EC2 node

    • Skill Level:
      Committers Level (Medium to Hard)

      Description

      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' -X POST http://appadvice.cloudant.com/foo/_bulk_docs

      [

      {"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.

        Attachments

          Activity

            People

            • Assignee:
              dionne Bob Dionne
              Reporter:
              jaynelson Jay Nelson
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 48h
                48h
                Remaining:
                Remaining Estimate - 48h
                48h
                Logged:
                Time Spent - Not Specified
                Not Specified