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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor - P4
    • Resolution: Works as Designed
    • None
    • None
    • Sharding
    • None
    • Sharding
    • ALL

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              backlog-server-sharding Backlog - Sharding Team
              jeff.yemin@mongodb.com Jeffrey Yemin
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: