-
Type:
Bug
-
Resolution: Incomplete
-
Priority:
Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Querying
-
None
-
Environment:mongodb-2.2, pymongo 2.4,
-
ALL
(I'm marking this minor due to the ancientness of the release not severity of the issue.)
We created a new index and suddenly queries using that index were reporting non-zero counts when they had zero elements in their resultset. I've put the console output in the attachment which shows cursor.count() returning non-zero but attempts to access element 0 generating an error and then shows the explain which clearly shows that `n` is 0.
The index we created was
ensureIndex({'_id.tag': 1, '_id.org': 1, '_id.course': 1, 'definition.children': 1})
When we deleted the index, the code worked once again.
This is for the open sourced edx.org code base (feel free to look at the code base.py _get_raw_parent_location)