summaryrefslogtreecommitdiff
path: root/src/mongo/shell/collection.js
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2014-11-17 14:07:21 -0500
committerEliot Horowitz <eliot@10gen.com>2014-11-17 17:20:32 -0500
commitd6ac44b4ac2f20c9a3145f575e72ebe2528db3c6 (patch)
treefb9bb04e923857b5ea8888d2b7aded3befcef55d /src/mongo/shell/collection.js
parent05a80c840a7389ee182e82d3724032ac874b3c74 (diff)
downloadmongo-d6ac44b4ac2f20c9a3145f575e72ebe2528db3c6.tar.gz
SERVER-16171: fix repairIterator releasing under WT
Diffstat (limited to 'src/mongo/shell/collection.js')
-rw-r--r--src/mongo/shell/collection.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mongo/shell/collection.js b/src/mongo/shell/collection.js
index 0d346ef4c27..8262710d102 100644
--- a/src/mongo/shell/collection.js
+++ b/src/mongo/shell/collection.js
@@ -1049,7 +1049,15 @@ DBCollection.prototype.clean = function() {
return this._dbCommand( { clean: this.getName() } );
}
-
+DBCollection.prototype.hashAllDocs = function() {
+ var cmd = { dbhash : 1,
+ collections : [ this._shortName ] };
+ var res = this._dbCommand( cmd );
+ var hash = res.collections[this._shortName];
+ assert( hash );
+ assert( typeof(hash) == "string" );
+ return hash;
+}
/**
* <p>Drop a specified index.</p>