-
Type: Question
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Sharding
-
None
Many indexed queries are bracketed by data type. For example the index bounds for { a:
{ $gt:0 }} are
"indexBounds" : { "a" : [ [ 0, 1.7976931348623157e+308 ] ] },
The max value of a we will scan is 1.7976931348623157e+308, not maxKey. When determining which shards a query should be sent to, though, we do not perform type bracketing. The queryutil code implements a special mode that disables bracketing just for this case. It would be helpful to understand why type bracketing is disabled.
void ChunkManager::getShardsForQuery( set<Shard>& shards , const BSONObj& query ) const { OrRangeGenerator org(_ns.c_str(), query, false);
(The 'false' argument disables type bracketing.)
- related to
-
SERVER-4555 check and clean sharding utilization of queryutil code
- Closed