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

Distinct preceded by sharded collection drop fails with "database not found"

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.3.0, 5.2.2
    • Affects Version/s: 5.0.3, 4.2.17, 4.4.10, 5.1.0-rc0
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • ALL
    • v5.2, v5.1, v5.0, v4.4, v4.2
    • Hide

      (On a sharded cluster, e.g. run mlaunch-cluster and connect with mongo shell)
      coll = db.getCollection("collName")
      coll.drop()
      coll.distinct("a") // fails with "database not found"

      Show
      (On a sharded cluster, e.g. run mlaunch-cluster and connect with mongo shell) coll = db.getCollection("collName") coll.drop() coll.distinct("a") // fails with "database not found"
    • 10

      The distinct command does not ensure that the database exists before attempting to run.

            Assignee:
            alya.berciu@mongodb.com Alya Berciu
            Reporter:
            alya.berciu@mongodb.com Alya Berciu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: