[SERVER-18411] bad hint when using named indexes Created: 11/May/15 Updated: 14/May/15 Resolved: 14/May/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Storage |
| Affects Version/s: | 3.0.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Bret Curtis | Assignee: | Ramon Fernandez Marina |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Operating System: | ALL |
| Steps To Reproduce: | db version v3.0.2 |
| Participants: |
| Description |
I see this when using the mongoshell as well as with PyMongo and TxMongo. The query works when using:
|
| Comments |
| Comment by Ramon Fernandez Marina [ 14/May/15 ] | |||||||||||||
|
Understood, thanks for getting back to us psi29a. Closing this ticket now. | |||||||||||||
| Comment by Bret Curtis [ 14/May/15 ] | |||||||||||||
|
If that is the case, then no worries. No reason to spend any more time on this. We've corrected it on TxMongo's side to follow your lead on hinting. Cheers and thanks for the help! | |||||||||||||
| Comment by Ramon Fernandez Marina [ 13/May/15 ] | |||||||||||||
|
I can't get that syntax to work in the shell in 2.6.9; I also tried with pymongo 2.7.2, but no luck either. Given the rules on hinting I would guess it was a bug that got corrected at some point during the MongoDB 2.7 development cycle. If you're interested in the details we'd need a full reproducer, including the the exact versions of pymongo and MongoDB you're using, as we have not been successful reproducing on our end. Thanks, | |||||||||||||
| Comment by Bret Curtis [ 12/May/15 ] | |||||||||||||
|
Why did this work on MongoDB 2.6 and not on 3.0 ?
test_index is the named index. | |||||||||||||
| Comment by Bret Curtis [ 11/May/15 ] | |||||||||||||
|
I see the problem now, my code was sending this:
while it should be:
It looks like this behaviour has changed from 2.6 to 3.0. Right? | |||||||||||||
| Comment by Ramon Fernandez Marina [ 11/May/15 ] | |||||||||||||
|
Can you please send the code you're using? I can reproduce this assertion (both in 3.0.2 and 2.6.9) when using the wrong syntax for hinting using the index name:
| |||||||||||||
| Comment by Bret Curtis [ 11/May/15 ] | |||||||||||||
|
This worked on MongoDB 2.6 |