CouchDB
  1. CouchDB
  2. COUCHDB-911

Same ocurrence of a document in _bulk_docs generates erroneous conflict messages

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor 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.

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Bob Dionne
            Reporter:
            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

                Development