diff options
author | David Storch <david.storch@10gen.com> | 2015-04-08 14:41:05 -0400 |
---|---|---|
committer | David Storch <david.storch@10gen.com> | 2015-04-09 16:43:49 -0400 |
commit | 374438c9134e6e31322b05c8ab4c5967d97bf3eb (patch) | |
tree | 07e626f2c197b75e2e97c93b7bb16ca8d73116ef /jstests/mmap_v1 | |
parent | 8f7ad88b463c5dea8bca8d8e0626fa80f35e3a47 (diff) | |
download | mongo-374438c9134e6e31322b05c8ab4c5967d97bf3eb.tar.gz |
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.
Diffstat (limited to 'jstests/mmap_v1')
-rw-r--r-- | jstests/mmap_v1/use_power_of_2.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/jstests/mmap_v1/use_power_of_2.js b/jstests/mmap_v1/use_power_of_2.js index 26977034763..7e7d8a466b2 100644 --- a/jstests/mmap_v1/use_power_of_2.js +++ b/jstests/mmap_v1/use_power_of_2.js @@ -18,16 +18,16 @@ function checkStorageSize(expectedSize, sameLoc) { t.insert(doc); assert.eq(t.stats().size, expectedSize, "size should be expected"); - var oldLoc = t.find()._addSpecial("$showDiskLoc" , true).toArray()[0].$diskLoc; + var oldLoc = t.find().showRecordId().toArray()[0].$recordId; // Remvoe smaller doc, insert a bigger one. t.remove(doc); t.insert(bigDoc); - var newLoc = t.find()._addSpecial("$showDiskLoc" , true).toArray()[0].$diskLoc; + var newLoc = t.find().showRecordId().toArray()[0].$recordId; // Check the diskloc of two docs. - assert.eq(oldLoc.file == newLoc.file && oldLoc.offset == newLoc.offset, sameLoc); + assert.eq(friendlyEqual(oldLoc, newLoc), sameLoc); } t.drop(); |