summaryrefslogtreecommitdiff
path: root/src/mongo/shell/collection.js
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2016-03-03 14:16:12 -0500
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2016-03-08 15:29:07 -0500
commitebdc9e8e3fa1265688601c29b8b00591d9afa77f (patch)
tree1cb443a3d0c85e7081668d794b0b7c59a7e9c9d1 /src/mongo/shell/collection.js
parent7df00746cc59c9df635402f531abd18481b9a034 (diff)
downloadmongo-ebdc9e8e3fa1265688601c29b8b00591d9afa77f.tar.gz
SERVER-22948 Assert that starting/stopping the balancer is successful
Diffstat (limited to 'src/mongo/shell/collection.js')
-rw-r--r--src/mongo/shell/collection.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/shell/collection.js b/src/mongo/shell/collection.js
index 06d79385b4a..7acb73bf71c 100644
--- a/src/mongo/shell/collection.js
+++ b/src/mongo/shell/collection.js
@@ -500,9 +500,10 @@ DBCollection.prototype.update = function( query , obj , upsert , multi ){
this._validateUpdateDoc(obj);
this.getMongo().update(this._fullName, query, obj, upsert, multi);
- // enforce write concern, if required
- if (wc)
+ // Enforce write concern, if required
+ if (wc) {
result = this.runCommand("getLastError", wc instanceof WriteConcern ? wc.toJSON() : wc);
+ }
}
this._printExtraInfo("Updated", startTime);