[SERVER-56550] Require Versioned API options for getMore and transaction-continuing commands Created: 01/May/21  Updated: 29/Oct/23  Resolved: 16/May/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.0.0-rc0

Type: Improvement Priority: Major - P3
Reporter: A. Jesse Jiryu Davis Assignee: A. Jesse Jiryu Davis
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-55614 Permit Versioned API options for getM... Closed
Documented
is documented by DOCS-14459 Investigate changes in SERVER-56550: ... Closed
Related
is related to MONGOSH-767 Skip tests due to lack of versioned A... Closed
Backwards Compatibility: Fully Compatible
Sprint: Elastic 2021-05-10, Elastic 2021-05-17
Participants:

 Description   

Once the dust settles on SERVER-55614 (make Versioned API params optional for getMore/txn-continuing commands), make them required. The API params for getMore must be exactly the same as those submitted with the cursor-creating command, and those submitted with a txn-continuing command must exactly match those of the txn-initiating command.



 Comments   
Comment by A. Jesse Jiryu Davis [ 16/May/21 ]

I was confused, we upgrade mongos after shards, so the upgrade bug I was worried about can't actually be a problem: https://docs.mongodb.com/manual/release-notes/4.4-upgrade-sharded-cluster/

Comment by Githook User [ 13/May/21 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'email': 'jesse@mongodb.com', 'username': 'ajdavis'}

Message: SERVER-56550 Require consistent API params in getMore and txns

Transaction-continuing commands must use the same API parameters as the
transaction's first command (it is no longer optional), and similarly
getMore must use the same as the cursor-creating command.
Branch: master
https://github.com/mongodb/mongo/commit/500a405a5ce235507f56fb47e8d5d4b368d3458d

Comment by Githook User [ 13/May/21 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'email': 'jesse@mongodb.com', 'username': 'ajdavis'}

Message: SERVER-56550 Agg fuzzer includes API params in getMore (#462)
Branch: master
https://github.com/10gen/jstestfuzz/commit/ded37d756ac3712702851877c4f27125036be5f3

Comment by A. Jesse Jiryu Davis [ 07/May/21 ]

Before we close this, let's talk about upgrade/downgrade issues. I think there's an issue with mongos 5.0 and mongod 4.4. A client can call commitTransaction on mongos with apiVersion: "1", and mongos calls prepareTransaction on shards with apiVersion: "1", they respond with an unrecognized-parameter error, and mongos retries forever(?).

Comment by A. Jesse Jiryu Davis [ 01/May/21 ]

Restore the CannotSpecifyAPIParametersAfterFirstStatement test I deleted from transaction_router_test.cpp in SERVER-55614, and adapt it to test that API params are required.

Generated at Thu Feb 08 05:39:33 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.