summaryrefslogtreecommitdiff
path: root/src/mongo/shell/utils_sh.js
diff options
context:
space:
mode:
authorMarcos José Grillo Ramírez <marcos.grillo@10gen.com>2019-11-21 10:55:40 +0000
committerevergreen <evergreen@mongodb.com>2019-11-21 10:55:40 +0000
commitf48da7a0f83762d214128799923e4bcede800dbe (patch)
tree4235e34ce3bd254e3513fef90996da252e4fc645 /src/mongo/shell/utils_sh.js
parent57f2fc733c2db98f3cab55250f4d31458234836d (diff)
downloadmongo-f48da7a0f83762d214128799923e4bcede800dbe.tar.gz
SERVER-43990 A command to confirm that all chunks have been moved to the right zone after the initial split
Diffstat (limited to 'src/mongo/shell/utils_sh.js')
-rw-r--r--src/mongo/shell/utils_sh.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mongo/shell/utils_sh.js b/src/mongo/shell/utils_sh.js
index 07c3b5a14b1..d60fe31c7c2 100644
--- a/src/mongo/shell/utils_sh.js
+++ b/src/mongo/shell/utils_sh.js
@@ -91,6 +91,9 @@ sh.help = function() {
print("\tsh.disableAutoSplit() disable autoSplit on one collection");
print("\tsh.enableAutoSplit() re-enable autoSplit on one collection");
print("\tsh.getShouldAutoSplit() returns whether autosplit is enabled");
+ print(
+ "\tsh.balancerCollectionStatus(fullName) " +
+ "returns wheter the specified collection is balanced or the balancer needs to take more actions on it");
};
sh.status = function(verbose, configDB) {
@@ -543,6 +546,10 @@ sh._shardingStatusStr = function(indent, s) {
return indentStr(indent, s) + "\n";
};
+sh.balancerCollectionStatus = function(coll) {
+ return sh._adminCommand({balancerCollectionStatus: coll}, true);
+};
+
function printShardingStatus(configDB, verbose) {
// configDB is a DB object that contains the sharding metadata of interest.
// Defaults to the db named "config" on the current connection.
@@ -827,4 +834,4 @@ function printShardingSizes(configDB) {
});
print(raw);
-}
+} \ No newline at end of file