[SERVER-5022] full document always loaded for matches if there is a chunk manager Created: 20/Feb/12 Updated: 21/Dec/14 Resolved: 05/Sep/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying, Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 2.7.6 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Aaron Staple | Assignee: | Greg Studer |
| Resolution: | Done | Votes: | 5 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Description |
|
This renders covered indexes ineffective when shardingState.needShardChunkManager(pq.ns()) is true. Not sure if this is true in all sharding setups or just some.
|
| Comments |
| Comment by J Rassi [ 08/Oct/14 ] | ||||||||||||
|
dan@10gen.com: I don't think it quite "lifts the restriction" entirely, since the change in this ticket only permits covered queries against indexes that have the shard key as a component (that is, the shard still needs to check if it owns the chunk). | ||||||||||||
| Comment by Daniel Pasette (Inactive) [ 08/Oct/14 ] | ||||||||||||
|
samk, this change does require doc changes because it lifts the limitation that sharded queries are not covered. See: http://docs.mongodb.org/manual/core/query-optimization/#limitations | ||||||||||||
| Comment by Githook User [ 03/Sep/14 ] | ||||||||||||
|
Author: {u'username': u'gregstuder', u'name': u'Greg Studer', u'email': u'greg@10gen.com'}Message: | ||||||||||||
| Comment by Githook User [ 02/Sep/14 ] | ||||||||||||
|
Author: {u'username': u'gregstuder', u'name': u'Greg Studer', u'email': u'greg@10gen.com'}Message: | ||||||||||||
| Comment by Jason R. Coombs [ 20/Jun/14 ] | ||||||||||||
|
Why is it not both higher priority and a bug that clients are required to query secondaries to perform queries against an index? | ||||||||||||
| Comment by Jason R. Coombs [ 20/Jun/14 ] | ||||||||||||
|
This issue continues to be a serious impediment to our use of MongoDB. The workaround to use the secondaries for queries which must be fulfilled by indexes is clumsy and error-prone. It means that on the whole, our systems rely on both a primary and secondary. That means that rather than having redundancy and failover, we have two points of failure (if either primary or secondary is unavailable, our systems fail). | ||||||||||||
| Comment by Alexander Komyagin [ 05/May/14 ] | ||||||||||||
|
Attaching the script that can be used to easily demonstrate the issue (thanks to jaraco). With reading from primary in a sharded cluster script fails, with reading from secondaries - succeeds. | ||||||||||||
| Comment by Aaron Staple [ 03/Oct/12 ] | ||||||||||||
|
Here's what that code looks like now
|