[SERVER-38590] Allow suites using txn_override.js to run transactions without causal consistency Created: 13/Dec/18  Updated: 29/Oct/23  Resolved: 17/Dec/18

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.1.7

Type: Task Priority: Major - P3
Reporter: Jack Mulrow Assignee: Jack Mulrow
Resolution: Fixed Votes: 0
Labels: ShardedTxn:Testing
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-38614 txn_override.js calls the deleted fun... Closed
Related
is related to SERVER-38936 Create unittests for txn_override.js Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2018-12-17, Sharding 2018-12-31
Participants:

 Description   

Several suites use txn_override.js to bundle operations in jscore tests into multi-statement transactions, which involves attaching a read concern to the first command in each bundle so it can start a transaction. The override checks if an operationTime exists on the default session for a database and attaches it as afterClusterTime in the command's readConcern if it does. All sessions track operationTime, so this value will almost always be set and almost all transactions started by the override will be using causal consistency.

Causal consistency is not required to read your own writes if all reads and writes are sent to the same node without failovers, which is guaranteed in several of these passthroughs, so modifying the override to allow disabling causal consistency and doing so in the passthroughs where it is not required would increase coverage of transactions.



 Comments   
Comment by Githook User [ 07/Jan/19 ]

Author:

{'username': 'jsmulrow', 'email': 'jack.mulrow@mongodb.com', 'name': 'Jack Mulrow'}

Message: SERVER-38590 Fix txn_override_causal_consistency.js testCommit()
Branch: master
https://github.com/mongodb/mongo/commit/ed99636536282ec08b23d9d7a7d3861228200be4

Comment by Githook User [ 17/Dec/18 ]

Author:

{'username': 'jsmulrow', 'email': 'jack.mulrow@mongodb.com', 'name': 'Jack Mulrow'}

Message: SERVER-38590 Use txn_override.js without causal consistency in suites that don't require it
Branch: master
https://github.com/mongodb/mongo/commit/9d9ac978ebe4a2fb11a6c278daff204b54e02e7b

Generated at Thu Feb 08 04:49:23 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.