[CDRIVER-3053] mongoc_collection_remove and delete alias fails if retryWrites=true Created: 29/Mar/19  Updated: 28/Oct/23  Resolved: 03/Apr/19

Status: Closed
Project: C Driver
Component/s: libmongoc
Affects Version/s: 1.10.0
Fix Version/s: 1.15.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

Issue Links:
Depends
is depended on by CDRIVER-2961 Support Retryable Writes on by Default Closed
Related
related to CDRIVER-2840 Delete Many and Update Many fail with... Closed
related to CDRIVER-3051 Using multi flag with mongoc_collecti... Closed

 Description   

Similar to CDRIVER-3051, mongoc_collection_remove() and its mongoc_collection_delete() alias both fail to set the has_multi_write flag on a command, which can lead to a server error if retryable writes are enabled.

I found no existing tests for these methods, so I will add a regression test for this issue that utilizes both methods.



 Comments   
Comment by Githook User [ 03/Apr/19 ]

Author:

{'name': 'Jeremy Mikola', 'username': 'jmikola', 'email': 'jmikola@gmail.com'}

Message: CDRIVER-3053 set has_multi_write in coll remove/delete

If has_multi_write is not set, a 3.6+ server will return an error when
a multi-delete is sent while retryWrites is enabled.
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/f294736a71ab4f5cb7525c00fd91819ee56179f6

Generated at Wed Feb 07 21:17:01 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.