[SERVER-22041] Count command does not respect hint if query predicate is empty Created: 31/Dec/15 Updated: 18/Apr/16 Resolved: 05/Feb/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | 3.3.2 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | J Rassi | Assignee: | Charlie Swanson |
| Resolution: | Done | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Major Change |
| Operating System: | ALL |
| Sprint: | Query 10 (02/22/16) |
| Participants: |
| Description |
|
The count command does not respect the user-specified hint, if an empty query predicate is specified. This is due to a bug in CountStage::work(), which fails to check for a non-empty hint before deciding to apply the "trivial count" optimization. Reproduce as follows:
|
| Comments |
| Comment by Githook User [ 18/Apr/16 ] |
|
Author: {u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@mongodb.com'}Message: |
| Comment by Charlie Swanson [ 05/Feb/16 ] |
|
This was fixed with ebc481d27e408d8608075a61eba2a68be43c1314 as part of |
| Comment by Charlie Swanson [ 02/Feb/16 ] |
|
This should be resolved by |