-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 1.6.0
-
Component/s: Shell API
-
None
-
Environment:Windows
-
1
-
Iteration Quahog
-
Not Needed
When I call new function sh.getShardedDataDistribution() then it returns an error, despite I run mongos
Connecting to: mongodb://<credentials>@d-mipmdb-as-01:27017,d-mipmdb-as-02:27017/admin?authSource=admin&appName=mongosh+1.6.0 Using MongoDB: 5.0.3 Using Mongosh: 1.6.0 [mongos] admin> db.runCommand({isdbgrid: 1}) { isdbgrid: 1, hostname: 'd-mipmdb-as-01.swi.srse.net', ok: 1 } [mongos] admin> sh.getShardedDataDistribution() Uncaught: MongoshRuntimeError: [COMMON-10004] sh.getShardedDataDistribution only works on mongos at Shard.getShardedDataDistribution (C:\Programs\MongoDB\Server\bin\mongosh.exe:390900:15) at async Shard.getShardedDataDistribution (C:\Programs\MongoDB\Server\bin\mongosh.exe:371185:14) at async Shard.<anonymous> (C:\Programs\MongoDB\Server\bin\mongosh.exe:370917:16) at async REPL3:34:162 at async ShellEvaluator.innerEval (C:\Programs\MongoDB\Server\bin\mongosh.exe:475887:14) at async ShellEvaluator.customEval (C:\Programs\MongoDB\Server\bin\mongosh.exe:475894:30) at async MongoshNodeRepl.eval (C:\Programs\MongoDB\Server\bin\mongosh.exe:550660:24) at async PrettyREPLServer.repl.eval (C:\Programs\MongoDB\Server\bin\mongosh.exe:503953:18) [mongos] admin>