summaryrefslogtreecommitdiff
path: root/src/mongo
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo')
-rw-r--r--src/mongo/shell/utils.js8
-rw-r--r--src/mongo/shell/utils_sh.js22
2 files changed, 15 insertions, 15 deletions
diff --git a/src/mongo/shell/utils.js b/src/mongo/shell/utils.js
index b8f78c28644..b84250ad598 100644
--- a/src/mongo/shell/utils.js
+++ b/src/mongo/shell/utils.js
@@ -1536,7 +1536,7 @@ rs.add = function(hostport, arb) {
assert.soon(function() {
var cfg = hostport;
- var local = db.getSisterDB("local");
+ var local = db.getSiblingDB("local");
assert(local.system.replset.count() <= 1,
"error: local.system.replset has unexpected contents");
var c = local.system.replset.findOne();
@@ -1612,13 +1612,13 @@ rs.conf = function() {
if (resp.ok && !(resp.errmsg) && resp.config)
return resp.config;
else if (resp.errmsg && resp.errmsg.startsWith("no such cmd"))
- return db.getSisterDB("local").system.replset.findOne();
+ return db.getSiblingDB("local").system.replset.findOne();
throw new Error("Could not retrieve replica set config: " + tojson(resp));
};
rs.config = rs.conf;
rs.remove = function(hn) {
- var local = db.getSisterDB("local");
+ var local = db.getSiblingDB("local");
assert(local.system.replset.count() <= 1,
"error: local.system.replset has unexpected contents");
var c = local.system.replset.findOne();
@@ -1661,7 +1661,7 @@ rs.debug.nullLastOpWritten = function(primary, secondary) {
};
rs.debug.getLastOpWritten = function(server) {
- var s = db.getSisterDB("local");
+ var s = db.getSiblingDB("local");
if (server) {
s = connect(server + "/local");
}
diff --git a/src/mongo/shell/utils_sh.js b/src/mongo/shell/utils_sh.js
index d60fe31c7c2..a81d4c8b303 100644
--- a/src/mongo/shell/utils_sh.js
+++ b/src/mongo/shell/utils_sh.js
@@ -16,7 +16,7 @@ sh._checkFullName = function(fullName) {
sh._adminCommand = function(cmd, skipCheck) {
if (!skipCheck)
sh._checkMongos();
- return db.getSisterDB("admin").runCommand(cmd);
+ return db.getSiblingDB("admin").runCommand(cmd);
};
sh._getConfigDB = function() {
@@ -276,7 +276,7 @@ sh.disableBalancing = function(coll) {
sh._checkMongos();
}
- return assert.commandWorked(dbase.getSisterDB("config").collections.update(
+ return assert.commandWorked(dbase.getSiblingDB("config").collections.update(
{_id: coll + ""},
{$set: {"noBalance": true}},
{writeConcern: {w: 'majority', wtimeout: 60000}}));
@@ -293,7 +293,7 @@ sh.enableBalancing = function(coll) {
sh._checkMongos();
}
- return assert.commandWorked(dbase.getSisterDB("config").collections.update(
+ return assert.commandWorked(dbase.getSiblingDB("config").collections.update(
{_id: coll + ""},
{$set: {"noBalance": false}},
{writeConcern: {w: 'majority', wtimeout: 60000}}));
@@ -309,13 +309,13 @@ sh._lastMigration = function(ns) {
var config = null;
if (!ns) {
- config = db.getSisterDB("config");
+ config = db.getSiblingDB("config");
} else if (ns instanceof DBCollection) {
coll = ns;
- config = coll.getDB().getSisterDB("config");
+ config = coll.getDB().getSiblingDB("config");
} else if (ns instanceof DB) {
dbase = ns;
- config = dbase.getSisterDB("config");
+ config = dbase.getSiblingDB("config");
} else if (ns instanceof ShardingTest) {
config = ns.s.getDB("config");
} else if (ns instanceof Mongo) {
@@ -324,11 +324,11 @@ sh._lastMigration = function(ns) {
// String namespace
ns = ns + "";
if (ns.indexOf(".") > 0) {
- config = db.getSisterDB("config");
+ config = db.getSiblingDB("config");
coll = db.getMongo().getCollection(ns);
} else {
- config = db.getSisterDB("config");
- dbase = db.getSisterDB(ns);
+ config = db.getSiblingDB("config");
+ dbase = db.getSiblingDB(ns);
}
}
@@ -554,7 +554,7 @@ 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.
if (configDB === undefined)
- configDB = db.getSisterDB('config');
+ configDB = db.getSiblingDB('config');
var version = configDB.getCollection("version").findOne();
if (version == null) {
@@ -785,7 +785,7 @@ function printShardingSizes(configDB) {
// configDB is a DB object that contains the sharding metadata of interest.
// Defaults to the db named "config" on the current connection.
if (configDB === undefined)
- configDB = db.getSisterDB('config');
+ configDB = db.getSiblingDB('config');
var version = configDB.getCollection("version").findOne();
if (version == null) {