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

Can't use getMore or transaction-continuing commands when requireApiVersion parameter is true

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.9.0
    • Affects Version/s: 4.7.0
    • Component/s: Querying
    • None
    • Fully Compatible
    • ALL

      I start a 4.7.0 standalone mongod like:

      mongod --setParameter requireApiVersion=true
      

      If I don’t include apiVersion: "1" in the getMore command, I get the error:

      {
        “ok”: 0.0, 
        “errmsg”: “The apiVersion parameter is required, please configure your MongoClient’s API version”, 
        “code”: 498870, 
        “codeName”: “Location498870"
      }
      

      and if I do include it I get:

      {
         “ok”: 0.0, 
         “errmsg”: “Cannot pass in API parameter field apiVersion”,
         “code”: 4937600, 
         “codeName”: “Location4937600"
      }
      

      According to spec the server should not accept api version in getMore commands:

      The getMore command does not accept API parameters; cursors inherit their API parameters from the initiating command. 

      so I expect the second error but not the first. 

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: