Discovered in testing with 1.12.0, still an issue in 1.13.0. Previously working in 1.9.4. Have not built 1.10.0 or 1.11.0 (cannot confirm which version this stopped working)
Testing against 3.6.
Connection string with retryWrites=true
mongoc_collection_delete_many() and mongoc_collection_update_many() both return an error as the request contains the "txnNumber" field.
delete: "writeErrors" : [ { "index" : 0, "code" : 72, "errmsg" : "Cannot use (or request) retryable writes with limit=0" }
update: "writeErrors" : [ { "index" : 0, "code" : 72, "errmsg" : "Cannot use (or request) retryable writes with multi=true" }
The APM log for both is attached. The txnNumber field is set in both requests even though these requests do not support retryable writes. (The retryable writes spec states "Drivers MUST NOT add a transaction ID to any single- or multi-statement write commands that include one or more multi-document write operations.")
A workaround is to use bulk operation instead.
- is caused by
-
CDRIVER-2373 IDL for functions that take flexible options
- Closed
- is related to
-
CDRIVER-3051 Using multi flag with mongoc_collection_update fails if retryWrites=true
- Closed
-
CDRIVER-3053 mongoc_collection_remove and delete alias fails if retryWrites=true
- Closed