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

Same ocurrence of a document in _bulk_docs generates erroneous conflict messages

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.0
    • 1.2, 1.3
    • HTTP Interface
    • None
    • Cloudant BigCouch EC2 node

    • 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

            dionne Bob Dionne
            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