Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-2840

Delete Many and Update Many fail with retryWrites enabled

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.14.0
    • Affects Version/s: 1.10.0
    • Component/s: libmongoc
    • None
    • Environment:
      AIX

      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.

       

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            amygiersch Amy Giersch
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: