diff options
author | Eliot Horowitz <eliot@10gen.com> | 2014-11-17 14:07:21 -0500 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2014-11-17 17:20:32 -0500 |
commit | d6ac44b4ac2f20c9a3145f575e72ebe2528db3c6 (patch) | |
tree | fb9bb04e923857b5ea8888d2b7aded3befcef55d /src/mongo/shell/collection.js | |
parent | 05a80c840a7389ee182e82d3724032ac874b3c74 (diff) | |
download | mongo-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.js | 10 |
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> |