[SERVER-75496] Strict API passthrough should not run getMore commands with api strict if the cursor creating command did not Created: 30/Mar/23  Updated: 23/Jan/24

Status: Backlog
Project: Core Server
Component/s: None
Affects Version/s: 7.0.0-rc0
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Allison Easton Assignee: Backlog - Query Integration
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
depends on SERVER-76229 Allow find() test shell helper to acc... Backlog
Related
is related to SERVER-75755 Remove auth.js and transactions_write... Closed
Assigned Teams:
Query Integration
Operating System: ALL
Backport Requested:
v7.3
Steps To Reproduce:

Add the following code to jstests/sharding/hash_crud.js right before stopping the shardingtest fixture to artificially increase the oplog size on the config server and run the test in the sharding_api_strict_passthrough.

for (let i = 0; i < 30; i++) {    const coll = st.configRS.getPrimary().getDB("test" + i).getCollection("coll");    assert.commandWorked(coll.createIndex({x: 1}));    assert.commandWorked(coll.createIndex({y: 1}));} 

Sprint: QI 2023-04-17
Participants:
Linked BF Score: 162

 Description   

runCommandWithApiStrict used in the sharding_api_strict_passthrough suite does not always run find commands with api strict, but it always runs getMore commands with api strict. This will cause failures on any getMore commands for find commands that aren't run with api strict.
This is especially a problem because the teardown of the replsettest (used by the shardingtest for config servers) runs a find command with noCursorTimeout for checking the oplog. This means that if any test creates an oplog big enough to require calling getMore to traverse the oplog, the teardown of the test will fail with the following error:

"API parameter mismatch: getMore used params { apiVersion: \"1\", apiStrict: true }, the cursor-creating command used {}" 



 Comments   
Comment by Arun Banala [ 19/Apr/23 ]

I couldn't come up with any simple way to address this. We will have to pass explicit apiStrict:false in the find and getMore command to workaround this problem. Though, the find() test helper does not have a way to feed in API parameters. So I filed SERVER-76229 to address this problem first. After that is should be relatively simple to pass in explicit API parameters in replsettest.js.

Give that sharding_api_strict_passthrough is opt-in for newly added tests, I think we should just backlog this ticket for now and see if this problem comes up in the future again.

Generated at Thu Feb 08 06:30:19 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.