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

Inherited unacknowledged write concern errors in transaction

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.15.0
    • Component/s: libmongoc
    • Labels:
      None

      Description

      The /transactions/write-concern test is failing in master after a bug with parsing the runOn constraint of the spec tests was fixed in CDRIVER-3266.

      The failing test was using an unacknowledged write concern as a collection option, and expecting operations within the transaction to not apply that write concern and succeed:

      [2019/08/02 14:22:31.344] Expected success, got error "Cannot use client session with unacknowledged writes":
      [2019/08/02 14:22:31.344] { "name" : "insertOne", "object" : "collection", "collectionOptions" : { "writeConcern" : { "w" : 0 } }, "arguments" : { "session" : "session0", "document" : { "_id" : 1 } }, "result" : { "insertedId" : 1 } }
      

      Though the transaction's spec states:

      Drivers MUST NOT add the transaction’s writeConcern or any writeConcern inherited from the collection, database, or client to any preceding commands in the transaction.

        Attachments

          Activity

            People

            Assignee:
            kevin.albertson Kevin Albertson
            Reporter:
            kevin.albertson Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: