[DRIVERS-2134] Clarify write concern rules in the transactions spec Created: 08/Jun/19  Updated: 31/Mar/22

Status: Backlog
Project: Drivers
Component/s: Transactions
Fix Version/s: None

Type: Spec Change Priority: Major - P3
Reporter: Shane Harvey Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Driver Changes: Needed

 Description   

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))


Generated at Thu Feb 08 08:24:48 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.