Details
-
Task
-
Resolution: Done
-
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?