[SERVER-17718] change showDiskLoc to showRecordId Created: 24/Mar/15  Updated: 28/Oct/15  Resolved: 09/Apr/15

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

Type: Improvement Priority: Major - P3
Reporter: David Percy Assignee: David Storch
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
is documented by DOCS-5194 Document that cursor.showDiskLoc() is... Closed
Related
related to DRIVERS-219 Change showDiskLoc to showRecordId Closed
Backwards Compatibility: Minor Change
Sprint: Quint Iteration 3.1.2
Participants:

 Description   

Now that records are identified by a RecordId rather than a DiskLoc, could we rename showDiskLoc to showRecordId in the shell? If I understand correctly, non-MMAPv1 storage engines don't use DiskLocs, and reporting "file" and "offset" isn't correct:

> db.foo.find({}, {_id: 0}).showDiskLoc()
{ "i" : 0, "$diskLoc" : { "file" : 0, "offset" : 1 } }
{ "i" : 1, "$diskLoc" : { "file" : 0, "offset" : 2 } }
{ "i" : 2, "$diskLoc" : { "file" : 0, "offset" : 3 } }
{ "i" : 3, "$diskLoc" : { "file" : 0, "offset" : 4 } }
{ "i" : 4, "$diskLoc" : { "file" : 0, "offset" : 5 } }
{ "i" : 5, "$diskLoc" : { "file" : 0, "offset" : 6 } }
{ "i" : 6, "$diskLoc" : { "file" : 0, "offset" : 7 } }
{ "i" : 7, "$diskLoc" : { "file" : 0, "offset" : 8 } }
{ "i" : 8, "$diskLoc" : { "file" : 0, "offset" : 9 } }
{ "i" : 9, "$diskLoc" : { "file" : 0, "offset" : 10 } }
{ "i" : 10, "$diskLoc" : { "file" : 0, "offset" : 11 } }
{ "i" : 11, "$diskLoc" : { "file" : 0, "offset" : 12 } }
{ "i" : 12, "$diskLoc" : { "file" : 0, "offset" : 13 } }
{ "i" : 13, "$diskLoc" : { "file" : 0, "offset" : 14 } }
{ "i" : 14, "$diskLoc" : { "file" : 0, "offset" : 15 } }

http://docs.mongodb.org/manual/reference/operator/meta/showDiskLoc/



 Comments   
Comment by Githook User [ 09/Apr/15 ]

Author:

{u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}

Message: SERVER-17718 deprecate showDiskLoc()

The showDiskLoc() shell helper is now an alias for showRecordId(). The server still
accepts $showDiskLoc for OP_QUERY style find operations. For find command, the showDiskLoc
argument has been renamed to showRecordId.

Also renames the $diskLoc field returned in the resulting documents to $recordId. Unlike
$diskLoc, the $recordId field reports a single 64 bit integer rather than separately reporting the
high-order 32 bits and low-order 32 bits, which have MMAPv1-specific meaning of file and offset.
Branch: master
https://github.com/mongodb/mongo/commit/374438c9134e6e31322b05c8ab4c5967d97bf3eb

Comment by Githook User [ 09/Apr/15 ]

Author:

{u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}

Message: SERVER-17718 remove test natural.js

The same test coverage is provided by more easily maintainable unit tests.
We should be able to test $natural hint/sort without depending on $showDiskLoc.
Branch: master
https://github.com/mongodb/mongo/commit/8f7ad88b463c5dea8bca8d8e0626fa80f35e3a47

Comment by David Storch [ 24/Mar/15 ]

I linked this to SERVER-15176 (see "Epic Link"), and it will be completed as a subtask.

Comment by David Percy [ 24/Mar/15 ]

Oh, nice. Mark as duplicate?

Comment by David Storch [ 24/Mar/15 ]

This is already planned work as part of SERVER-15176.

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