0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

only make decision on shards based on filter

This commit is contained in:
Eliot Horowitz 2009-02-23 14:32:00 -05:00
parent de62cf49bc
commit f447474a7a

View File

@ -20,13 +20,16 @@ namespace mongo {
ShardInfo * info = r.getShardInfo();
assert( info );
Query query( q.query );
vector<Shard*> shards;
if ( info->getShardsForQuery( shards , q.query ) == 1 ){
if ( info->getShardsForQuery( shards , query.getFilter() ) == 1 ){
doQuery( r , shards[0]->getServer() );
return;
}
throw UserException( "real sharding doesn't nwork" );
}