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

Correct handling of Bulk Retry

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None

    Description

      With the major Driver refactoring for 3.2, most of the drivers seem to have decoupled the list of operations in a bulk operation from the function performing them. This means if a bulk op fails you can resubmit it, this is important in handling replica set elections.

      Python, PHP, Java and Javascript all follow this pattern.

      https://docs.mongodb.com/manual/reference/method/db.collection.bulkWrite/

      But the C driver appears not to have this part implemented yet and uses the older pattern of creating a BulkOperation 'object' and adding things to it - the problem with that is that according to the docs, you cannot re-submit a failed operation, So if it fails because there was no primary, or because the primary failed part way through - you cannot simply wait, resubmit and ignore duplicate _id's

      What is the correct form for handling bulk insert operations ( or idempotent bulk updates, or deletes) during failover when using the C driver?

      Attachments

        Activity

          People

            Unassigned Unassigned
            john.page@mongodb.com John Page
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: