Beispiel #1
0
 Shard& ShardManager::findShard( const BSONObj & obj ){
     
     for ( vector<Shard*>::iterator i=_shards.begin(); i != _shards.end(); i++ ){
         Shard * s = *i;
         if ( s->contains( obj ) )
             return *s;
     }
     throw UserException( "couldn't find a shard which should be impossible" );
 }