Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-2134

Clarify write concern rules in the transactions spec

    • Type: Icon: Spec Change Spec Change
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Component/s: Transactions
    • Needed
    • Hide

      Summary of necessary driver changes

      •  Drivers must implement the new prose test for ensuring collection write concern options are ignored when inside a transaction.

      Commits for syncing spec/prose tests
      (and/or refer to an existing language POC if needed)

      Context for other referenced/linked tickets

      •  
      Show
      Summary of necessary driver changes  Drivers must implement the new prose test for ensuring collection write concern options are ignored when inside a transaction. Commits for syncing spec/prose tests (and/or refer to an existing language POC if needed)   https://github.com/mongodb/specifications/blob/fc7996db26d0ea92091a5034c6acb287ef7282fe/source/transactions/tests/README.md#10-write-concern-not-inherited-from-collection-object-inside-transaction Context for other referenced/linked tickets  
    • $i18n.getText("admin.common.words.hide")
      Key Status/Resolution FixVersion
      CDRIVER-5788 Backlog
      CXX-3161 Backlog
      CSHARP-5392 Backlog
      GODRIVER-3410 Backlog
      JAVA-5684 Backlog
      NODE-6492 Backlog
      MOTOR-1402 Duplicate
      PYTHON-4938 Backlog
      PHPLIB-1580 Backlog
      RUBY-3582 Backlog
      RUST-2085 Backlog
      $i18n.getText("admin.common.words.show")
      #scriptField, #scriptField *{ border: 1px solid black; } #scriptField{ border-collapse: collapse; } #scriptField td { text-align: center; /* Center-align text in table cells */ } #scriptField td.key { text-align: left; /* Left-align text in the Key column */ } #scriptField a { text-decoration: none; /* Remove underlines from links */ border: none; /* Remove border from links */ } /* Add green background color to cells with FixVersion */ #scriptField td.hasFixVersion { background-color: #00FF00; /* Green color code */ } /* Center-align the first row headers */ #scriptField th { text-align: center; } Key Status/Resolution FixVersion CDRIVER-5788 Backlog CXX-3161 Backlog CSHARP-5392 Backlog GODRIVER-3410 Backlog JAVA-5684 Backlog NODE-6492 Backlog MOTOR-1402 Duplicate PYTHON-4938 Backlog PHPLIB-1580 Backlog RUBY-3582 Backlog RUST-2085 Backlog

      The tests added in SPEC-1125 highlight some confusion and easy misinterpretation of the write concern rules in the transactions spec. We should update the spec to make the rules more clear and concise. Adding an example might do the trick.

      This is what is indented to be supported:

      with session.start_transaction():
          w_0_coll = db.get_collection("w_0_coll", writeConcern=WriteConcern(w=0))
          # This is allowed, the write concern of the transaction is used instead of w=0.
          w_0_coll.insert_one({}, session=session)
      

      This is different from starting a transaction with an unacknowledged write concern which is not allowed (SPEC-1100):

       # Errors with "transactions do not support unacknowledged write concern: WriteConcern(w=0)"
      session.start_transaction(writeConcern=WriteConcern(w=0))
      

            Assignee:
            durran.jordan@mongodb.com Durran Jordan
            Reporter:
            shane.harvey@mongodb.com Shane Harvey
            Andreas Braun Andreas Braun
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: