[CDRIVER-2840] Delete Many and Update Many fail with retryWrites enabled Created: 01/Oct/18 Updated: 28/Oct/23 Resolved: 05/Oct/18 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | libmongoc |
| Affects Version/s: | 1.10.0 |
| Fix Version/s: | 1.14.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Amy Giersch | Assignee: | A. Jesse Jiryu Davis |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
AIX |
||
| Attachments: |
|
||||||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||||||
| Description |
|
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.
|
| Comments |
| Comment by Githook User [ 05/Oct/18 ] |
|
Author: {'name': 'A. Jesse Jiryu Davis', 'email': 'jesse@mongodb.com', 'username': 'ajdavis'}Message: These commands do not support retryable writes; they must not add txnId. |
| Comment by A. Jesse Jiryu Davis [ 02/Oct/18 ] |
|
Git bisecting, and reading diffs, suggests this change in 1.10.0 is buggy:
|
| Comment by A. Jesse Jiryu Davis [ 01/Oct/18 ] |
|
Thanks for the terrific bug report. We'll fix this in 1.14.0. Is your workaround reasonably convenient for now? |