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

Creation of already existing collection on a sharded cluster should be an error

    • Type: Icon: Bug Bug
    • Resolution: Works as Designed
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Sharding
    • ALL

      For all cluster types (standalone, repl, sharded), attempting to create an already-existing collection should result in an error, as with this test against a 3.6 server:

      mongos> db.runCommand({create : "foo"})
      {
      	"ok" : 1,
              ...
      }
      mongos> db.runCommand({create : "foo"})
      {
      	"ok" : 0,
      	"errmsg" : "a collection 'test.foo' already exists",
      	"code" : 48,
      	"codeName" : "NamespaceExists",
             ...
      }
      

      But with a sharded cluster running on the nightly build it no longer does:

      mongos> db.runCommand({create : "foo"})
      {
      	"ok" : 1,
              ...
      }
      mongos> db.runCommand({create : "foo"})
      {
      	"ok" : 1,
              ...
      }
      

      The behavioral difference was detected for the first time in this driver regression test. The git hash of the server in that test run is 3.7.1-280-g43fbd6a. The previous successful run of that test used a server with a git hash of 3.7.1-253-g2e1f172bc1.

            Assignee:
            backlog-server-sharding [DO NOT USE] Backlog - Sharding Team
            Reporter:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: