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

Regression: eval command on a non-existing database errors on mongos 3.2

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.2.8, 3.3.10
    • Component/s: Sharding
    • Sharding
    • ALL
    • Hide

      1. Launch 3.2 sharded cluster
      2. Connect via shell
      3. Drop database
      4. Run eval command

      Show
      1. Launch 3.2 sharded cluster 2. Connect via shell 3. Drop database 4. Run eval command

      Running eval on an empty database on mongos returns an error on MongoDB 3.2.8 (and 3.3.10), but not on 3.0.12.

      On 3.0.12:

      mongos> db.serverStatus().version
      3.0.12
      mongos> db.dropDatabase()
      { "dropped" : "test", "ok" : 1 }
      mongos> db.runCommand({eval:function(){return 42}})
      { "retval" : 42, "ok" : 1 }
      

      On 3.2.8:

      MongoDB Enterprise mongos> db.serverStatus().version
      3.2.8
      MongoDB Enterprise mongos> db.dropDatabase()
      { "info" : "database does not exist", "ok" : 1 }
      MongoDB Enterprise mongos> db.runCommand({eval:function(){return 42}})
      { "ok" : 0, "errmsg" : "database test not found", "code" : 26 }
      

      On 3.3.10:

      MongoDB Enterprise mongos> db.serverStatus().version
      3.3.10
      MongoDB Enterprise mongos> db.dropDatabase()
      { "info" : "database does not exist", "ok" : 1 }
      MongoDB Enterprise mongos> db.runCommand({eval:function(){return 42}})
      { "ok" : 0, "errmsg" : "database test not found", "code" : 26 }
      

            Assignee:
            backlog-server-sharding [DO NOT USE] Backlog - Sharding Team
            Reporter:
            david.golden@mongodb.com David Golden
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: