Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-75496

Strict API passthrough should not run getMore commands with api strict if the cursor creating command did not

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 7.0.0-rc0
    • Component/s: None
    • None
    • Query Integration
    • ALL
    • v8.0, v7.3
    • Hide

      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}));} 
      Show
      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}));}
    • QI 2023-04-17
    • 162

      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 {}" 

            Assignee:
            backlog-query-integration [DO NOT USE] Backlog - Query Integration
            Reporter:
            allison.easton@mongodb.com Allison Easton
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: