[SERVER-8113] Shard::containsNode does not check whether ReplicaSetMonitor::get returns null Created: 08/Jan/13  Updated: 11/Jul/16  Resolved: 15/Jan/13

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 2.3.1
Fix Version/s: 2.4.0-rc0

Type: Bug Priority: Major - P3
Reporter: Randolph Tan Assignee: Randolph Tan
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
related to SERVER-8194 Newly added shards shouldn't get put ... Closed
Operating System: ALL
Participants:

 Description   

Code in question:

        if ( _cs.type() == ConnectionString::SET ) {
            ReplicaSetMonitorPtr rs = ReplicaSetMonitor::get( _cs.getSetName(), true );
            return rs->contains( node );
        }

All other places that calls ReplicaSetMonitor::get checks whether it is null or not. One particular case this can be null is when the shard has been removed. Another possible scenario is would be when the shard was newly added, in particular, the case when StaticShardInfo adds the lookup entry for the replica set before the ReplicaSetMonitor has been initialized.



 Comments   
Comment by auto [ 17/Jan/13 ]

Author:

{u'date': u'2013-01-17T15:00:42Z', u'email': u'randolph@10gen.com', u'name': u'Randolph Tan'}

Message: Reworded warning for SERVER-8113 to avoid misleading users.
Branch: master
https://github.com/mongodb/mongo/commit/f15796bb641f06a5cc60cbc85447363169c1c23b

Comment by auto [ 15/Jan/13 ]

Author:

{u'date': u'2013-01-15T16:20:28Z', u'email': u'randolph@10gen.com', u'name': u'Randolph Tan'}

Message: SERVER-8113 Shard::containsNode does not check whether ReplicaSetMonitor::get returns null
Branch: master
https://github.com/mongodb/mongo/commit/3783307988cb6d56b7791013afb4052710c24224

Generated at Thu Feb 08 03:16:34 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.