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

        Bob Dionne made changes -
        Fix Version/s 1.2 [ 12315198 ]
        Filipe Manana made changes -
        Fix Version/s 1.3 [ 12318350 ]
        Fix Version/s 1.2 [ 12315198 ]
        Filipe Manana made changes -
        Summary Concurrent updates to the same document generate erroneous conflict messages Same ocurrence of a document in _bulk_docs generates erroneous conflict messages
        Bob Dionne made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Assignee Bob Dionne [ dionne ]
        Resolution Fixed [ 1 ]
        Bob Dionne made changes -
        Bob Dionne made changes -
        Attachment 0003-Add-references-to-docs-to-prevent-dups-from-being-co.patch [ 12498663 ]
        Filipe Manana made changes -
        Filipe Manana made changes -
        Adam Kocoloski made changes -
        Summary Repeating a doc._id in a _bulk_docs request results in erroneous "Document conflict" error Concurrent updates to the same document generate erroneous conflict messages
        Skill Level New Contributors Level (Easy) [ 10444 ] Committers Level (Medium to Hard) [ 10446 ]
        Bob Dionne made changes -
        Attachment 0001-Fix-whitespace.patch [ 12498661 ]
        Attachment 0002-Failing-test-for-duplicates-in-bulk-docs.patch [ 12498662 ]
        Attachment 0003-Add-references-to-docs-to-prevent-dups-from-being-co.patch [ 12498663 ]
        Bob Dionne made changes -
        Attachment whitespace.patch [ 12493802 ]
        Bob Dionne made changes -
        Attachment jira-911.patch [ 12493803 ]
        Jan Lehnardt made changes -
        Fix Version/s 1.2 [ 12315198 ]
        Bob Dionne made changes -
        Attachment whitespace.patch [ 12493802 ]
        Attachment jira-911.patch [ 12493803 ]
        Bob Dionne made changes -
        Attachment jira-911-patch2.diff [ 12491832 ]
        Bob Dionne made changes -
        Attachment jira-911-patch2.diff [ 12491832 ]
        Bob Dionne made changes -
        Attachment jira-911-patch.diff [ 12491386 ]
        Bob Dionne made changes -
        Attachment jira-911-patch.diff [ 12491386 ]
        Adam Kocoloski made changes -
        Resolution Won't Fix [ 2 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Jan Lehnardt made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Won't Fix [ 2 ]
        Jay Nelson created 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