Uploaded image for project: 'MongoDB Shell'
  1. MongoDB Shell
  2. MONGOSH-1328

db.collection.getShardDistribution() should give a warning rather than report collection is not sharded

    • 2
    • Not Needed

      Running db.collection.getShardDistribution() directly on a shard primary reports Collection X.Y is not sharded. even though it is. Running via a mongos correctly reports shard information.

      I think when running directly on a node, Mongo shell should instead respond "This command should be run via a mongos" or "Please connect to a mongos before calling this function"

            Assignee:
            Unassigned Unassigned
            Reporter:
            nicholas.cottrell@mongodb.com Nic Cottrell
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: