[SERVER-36057] Mongos should validate transaction options Created: 10/Jul/18  Updated: 29/Oct/23  Resolved: 20/Nov/18

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

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

Issue Links:
Related
is related to SERVER-36260 Mongos should reject commands that ar... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2018-12-03
Participants:

 Description   

Like mongod, mongos should validate the various transaction options, like autocommit and startTransaction. For example, a statement should not specify autocommit outside of a running transaction.



 Comments   
Comment by Githook User [ 20/Nov/18 ]

Author:

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

Message: SERVER-36057 Remove TODO in no_new_transactions_when_prepared_transaction_in_progress.js
Branch: master
https://github.com/mongodb/mongo/commit/51e3648d02cc25c95fa72af13c766690956110bc

Comment by Jack Mulrow [ 19/Nov/18 ]

As of SERVER-36260 all of the transaction API tests in core/txns run against both mongos and mongod, so I think this ticket can be closed. For instance, the example from this ticket's description is already covered by this test case.

There is one remaining TODO for this ticket, which is to enable this test case in no_new_transactions_when_prepared_transaction_in_progress.js. The TODO can already be removed, so I'll take it out before closing this ticket.

Comment by Randolph Tan [ 05/Nov/18 ]

No, the checks that were not in mongos were mostly inside beginOrContinueTxn, which we originally plan to make mongos and mongod share the same code. Will need to re-evaluate if the session factor has fixed this issue.

Comment by Esha Maharishi (Inactive) [ 05/Nov/18 ]

renctan, this has been done by making mongos call initializeOperationSessionInfo, right?

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