[CDRIVER-3035] Always allow bulk OP_INSERTs to accommodate unacknowledged write concerns Created: 22/Mar/19 Updated: 28/Oct/23 Resolved: 07/Nov/19 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | libmongoc |
| Affects Version/s: | None |
| Fix Version/s: | 1.16.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Jeremy Mikola | Assignee: | Jeremy Mikola |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
MongoDB 3.4 and earlier |
||
| Issue Links: |
|
||||||||||||||||
| Description |
|
Original description: mongoc_collection_insert_many() does not batch legacy inserts for unacknowledged write concerns While investigating I quickly tested this by modifying example-command-monitoring.c to connect to a MongoDB 3.4 server using w=0. Running the example file shows that three insert commands are issued when I would expect two. |
| Comments |
| Comment by Githook User [ 07/Nov/19 ] |
|
Author: {'name': 'Jeremy Mikola', 'username': 'jmikola', 'email': 'jmikola@gmail.com'}Message: Since libmongoc requires MongoDB 3.0+, OP_INSERT is only used for w:0 |
| Comment by Jeremy Mikola [ 01/Nov/19 ] |
|
Note: 129be86 removed write concern args for legacy write methods, since This supports removing allow_bulk_op_insert entirely, since libmongoc 1.9.0+ already assumes that these legacy write methods are only used for unacknowledged writes. |
| Comment by Jeremy Mikola [ 04/Apr/19 ] |
|
Repurposing this ticket per kevin.albertson's comment in PHPC-1351: If we can assume that legacy write operations are only applicable to w:0 writes, than we can remove allow_bulk_op_insert, and any other logic for acknowledged legacy write operations altogether. That seems more desirable. |