Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-655

Prevent re-execution of bulk ops

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor - P4 Minor - P4
    • 2.0.0
    • None
    • Bulk API, libmongoc
    • None
    • Major Change

    Description

      Contradicting the Bulk API spec, the driver allows multiple calls to the same mongoc_bulk_operation_execute ().

      If the bulk operation is only updates or removes then they'll be run twice. If inserts are included, the driver prepends object ids to the documents for insertion before the first execution, so the inserts fail with duplicate key error on the second and subsequent executions.

      API change, can't do it until 2.0.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: