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:
parent
de62cf49bc
commit
f447474a7a
@ -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" );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user