[SERVER-12056] hint() is not respected in find() Created: 11/Dec/13  Updated: 11/Jul/16  Resolved: 16/Dec/13

Status: Closed
Project: Core Server
Component/s: Index Maintenance, Querying
Affects Version/s: 2.5.4
Fix Version/s: 2.5.5

Type: Bug Priority: Major - P3
Reporter: Alexander Komyagin Assignee: Benety Goh
Resolution: Done Votes: 0
Labels: query_triage
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File server12056.js     File server12056.js     File test.js    
Issue Links:
Related
related to SERVER-6293 Index only query fills in missing val... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

Triage update:

Under 2.4.8, the planner generates a single indexed solution when a hint is provided.
Under 2.5.4, a collection scan is generated in addition to the indexed solution. It's possible for the collection scan to be ranked higher than the indexed solution, resulting in the hinted solution being ignored.

------

mongo --shell test.js
> use dummy
switched to db dummy
> doit()
BasicCursor

Expected to see "BtreeCursor ace.val_1 multi" output.



 Comments   
Comment by Githook User [ 16/Dec/13 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-12056 query planner should generate at least one indexed solution when a hint is provided.
Branch: master
https://github.com/mongodb/mongo/commit/d68f6bccbf4f1acdf09b1546ee9883821b7a9edd

Generated at Thu Feb 08 03:27:29 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.