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

Prevent re-execution of bulk ops

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.0.0
    • Affects Version/s: None
    • Component/s: Bulk API, libmongoc
    • None
    • Major Change

      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.

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

              Created:
              Updated: