summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSarah Zhou <sarah.zhou@10gen.com>2018-07-10 17:46:17 -0400
committerSarah Zhou <sarah.zhou@10gen.com>2018-07-12 13:36:35 -0400
commit2e975546f4676e1ba65e3376c08bd43bee14305f (patch)
treeffb81e8cd56b622088d95190e46f87f527387feb
parentdbd844703ad91562c9fe921b6911f57c29a3f0ea (diff)
downloadmongo-2e975546f4676e1ba65e3376c08bd43bee14305f.tar.gz
SERVER-35605 sh.setBalancerState() should check its argument type to avoid unexpected results
-rw-r--r--src/mongo/shell/utils_sh.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mongo/shell/utils_sh.js b/src/mongo/shell/utils_sh.js
index c83e2cff3ff..2fdc1ce6cb1 100644
--- a/src/mongo/shell/utils_sh.js
+++ b/src/mongo/shell/utils_sh.js
@@ -136,6 +136,7 @@ sh.moveChunk = function(fullName, find, to) {
};
sh.setBalancerState = function(isOn) {
+ assert(typeof(isOn) == "boolean", "Must pass boolean to setBalancerState");
if (isOn) {
return sh.startBalancer();
} else {