[SERVER-30059] Fix undefined 'ns' variable bug in sharding_continuous_config_stepdown.js Created: 07/Jul/17  Updated: 30/Oct/23  Resolved: 10/Jul/17

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 3.5.10

Type: Bug Priority: Major - P3
Reporter: Dianna Hohensee (Inactive) Assignee: Max Hirschhorn
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
is related to SERVER-29107 move shardCollection logic into new _... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: TIG 2017-07-31
Participants:
Linked BF Score: 0

 Description   

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.



 Comments   
Comment by Githook User [ 10/Jul/17 ]

Author:

{u'username': u'visemet', u'name': u'Max Hirschhorn', u'email': u'max.hirschhorn@mongodb.com'}

Message: SERVER-30059 Fix extraction of collection name in CSRS stepdown suite.
Branch: master
https://github.com/mongodb/mongo/commit/68eb01501452996e2f7102cf0219c13c75a12e74

Generated at Thu Feb 08 04:22:33 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.