Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-8113

Shard::containsNode does not check whether ReplicaSetMonitor::get returns null

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 2.4.0-rc0
    • 2.3.1
    • Sharding
    • None
    • ALL

    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.

      Attachments

        Activity

          People

            randolph@mongodb.com Randolph Tan
            randolph@mongodb.com Randolph Tan
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: