The ns variable is initialized here and can be undefined depending on whether the command is made using 'shardCollection' or 'shardcollection' – uppercase versus lowercase for the c --, both of which are legal calls.
If the cmdObj is
{shardCollection: 'foo.bar'.....}, then ns = cmdObj.shardCollection is defined, and the code works.
However, if cmdObj is
{shardcollection: 'foo.bar'....}, with a lowercase c, then ns = cmdObj.shardCollection is undefined, because javascripts discriminates upper and lower case.
- is related to
-
SERVER-29107 move shardCollection logic into new _configsvrShardCollection command on config server
- Closed