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

XMLWordPrintableJSON

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

      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:
              [DO NOT USE] Backlog - Sharding Team
              Reporter:
              Jeffrey Yemin
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: