[SERVER-34209] multi_statement_transaction_simple must use w:majority in setup Created: 30/Mar/18  Updated: 29/Oct/23  Resolved: 06/Apr/18

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

Type: Bug Priority: Major - P3
Reporter: Matthew Russotto Assignee: Tess Avitabile (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
related to SERVER-34242 Enable causal consistency in concurre... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Repl 2018-04-09
Participants:
Linked BF Score: 62

 Description   

The multi_statement_transaction_simple test in concurrency_replication does a setup using standard write concern. If the first transferMoney in this test happens to run before the setup becomes majority committed, it will do transfers that are no-ops (because it does updates with queries that find no documents), leading to a wrong count. So at least the last setup write must be done with write concern majority (might make sense to change to a bulk write)

Additionally the transferMoney code should check to make sure if the update updated exactly one document.



 Comments   
Comment by Githook User [ 06/Apr/18 ]

Author:

{'email': 'tess.avitabile@mongodb.com', 'name': 'Tess Avitabile', 'username': 'tessavitabile'}

Message: SERVER-34209 multi_statement_transaction_simple.js must use w:majority in setup
Branch: master
https://github.com/mongodb/mongo/commit/6c6ec1f2379a8af2b753837d965fe5b529b1bc59

Comment by Tess Avitabile (Inactive) [ 30/Mar/18 ]

Per in-person discussion, there is some work required to enable causal consistency for concurrency_replication, so for now I will just use majority writes in this test. I filed SERVER-34242.

Comment by Max Hirschhorn [ 30/Mar/18 ]

Could we fix this without changing the write concern by having the clients use an afterClusterTime of the main thread that runs the setup() function's operationTime? I think it is potentially useful to be able to run the multi_statement_transaction_simple.js FSM workload with different write concerns and had asked xiangyu.yao to write it in a way where that would be possible.

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