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

Dropping a collection in a replicaset should result in a no-op for 6.0 and below

    • Type: Icon: Bug Bug
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 5.0.19, 6.0.8
    • Component/s: None
    • Labels:
      None
    • Storage Execution
    • ALL

      After SERVER-43894 dropping a collection in a sharded cluster will result in a no-op.

      However for a replica-set this is not the case for 6.0 and below.

      Since we want to keep the user experience as uniform as possible, dropping a collection in replica-set should behave the same.

       

      Currently on a sharded sharded cluster on 6.0
      assert.commandWorked(db.runCommand({drop: "view"}));
      uncaught exception: Error: command failed: {
      "ok" : 0,
      "errmsg" : "ns not found",
      "code" : 26,
      "codeName" : "NamespaceNotFound",
      "$clusterTime" : {
      "clusterTime" : Timestamp(1690370301, 7),
      "signature" :

      { "hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="), "keyId" : NumberLong(0) }

      },
      "operationTime" : Timestamp(1690370301, 7)
      } with original command request: {
      "drop" : "view",
      "lsid" :

      { "id" : UUID("396b8789-2a0d-4b8c-9114-56738b51c39f") }

      ,
      "$clusterTime" : {
      "clusterTime" : Timestamp(1690370301, 7),
      "signature" :

      { "hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="), "keyId" : NumberLong(0) }

      }
      } on connection: connection to 127.0.0.1:27017 :
       

      Currently on a replica-set in 6.0
      assert.commandWorked(db.runCommand({drop: "view"}));
      {
      "info" : "database does not exist",
      "ok" : 1,
      "$clusterTime" : {
      "clusterTime" : Timestamp(1690370511, 1),
      "signature" :

      { "hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="), "keyId" : NumberLong(0) }

      },
      "operationTime" : Timestamp(1690370511, 1)
      }

            Assignee:
            backlog-server-execution [DO NOT USE] Backlog - Storage Execution Team
            Reporter:
            enrico.golfieri@mongodb.com Enrico Golfieri
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: