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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 4.7.0
    • 4.9.0
    • Querying
    • None
    • Fully Compatible
    • ALL

    Description

      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. 

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: