[CDRIVER-1492] Correct handling of Bulk Retry Created: 26/Aug/16 Updated: 11/Sep/19 Resolved: 26/Aug/16 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | John Page | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| 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? |
| Comments |
| Comment by A. Jesse Jiryu Davis [ 26/Aug/16 ] |
|
Right, since we're not necessarily planning to implement the same CRUD API as the other drivers ( |