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

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • 7.0.0-rc0
    • None
    • None
    • Query Integration
    • ALL
    • 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

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

      Attachments

        Activity

          People

            backlog-query-integration Backlog - Query Integration
            allison.easton@mongodb.com Allison Easton
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated: