[SERVER-5372] $showDiskLoc does not work with covered indexes in get more Created: 22/Mar/12  Updated: 19/May/14  Resolved: 13/May/14

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: 2.4.10
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Aaron Staple Assignee: Unassigned
Resolution: Done Votes: 1
Labels: pull-request
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

> c.ensureIndex( { a:1 } )
> c.save( { a:1 } )
> c.save( { a:1 } )
> c.save( { a:1 } )
> c.find( {}, { _id:0, a:1 } ).hint( { a:1 } )._addSpecial("$showDiskLoc" , true).batchSize( 2 )
{ "a" : 1, "$diskLoc" : { "file" : 0, "offset" : 57520 } }
{ "a" : 1, "$diskLoc" : { "file" : 0, "offset" : 57572 } }
{ "a" : 1 }



 Comments   
Comment by Benety Goh [ 13/May/14 ]

output in 2.6:

> c.find( {}, { _id:0, a:1 } ).hint( { a:1 } )._addSpecial("$showDiskLoc" , true).batchSize( 2 )
{ "a" : 1, "$diskLoc" : { "file" : 0, "offset" : 196784 } }
{ "a" : 1, "$diskLoc" : { "file" : 0, "offset" : 196848 } }
{ "a" : 1, "$diskLoc" : { "file" : 0, "offset" : 196912 } }
 

Comment by Benedikt Waldvogel [ 09/Oct/12 ]

done

Comment by Ian Whalen (Inactive) [ 09/Oct/12 ]

Hi bwaldvogel, in order to take a look at your pull request, we'll first need you to complete our Contributor Agreement at http://www.10gen.com/contributor

Comment by Benedikt Waldvogel [ 05/Oct/12 ]

Is there a workaround for this bug?

I've improved the JS test case such that it fails for this bug: https://github.com/mongodb/mongo/pull/311

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