mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-30 17:10:48 +01:00
rs clearer
This commit is contained in:
parent
8d3642f234
commit
8c11db1487
@ -543,7 +543,9 @@ namespace mongo {
|
||||
startupStatus = EMPTYCONFIG;
|
||||
startupStatusMsg = "can't get " + rsConfigNs + " config from self or any seed (EMPTYCONFIG)";
|
||||
log() << "replSet can't get " << rsConfigNs << " config from self or any seed (EMPTYCONFIG)" << rsLog;
|
||||
log(1) << "replSet have you run replSetInitiate yet?" << rsLog;
|
||||
static unsigned once;
|
||||
if( ++once == 1 )
|
||||
log() << "replSet info you may need to run replSetInitiate -- rs.initiate() in the shell -- if that is not already done" << rsLog;
|
||||
if( _seeds->size() == 0 )
|
||||
log(1) << "replSet info no seed hosts were specified on the --replSet command line" << rsLog;
|
||||
}
|
||||
|
@ -192,7 +192,7 @@ namespace mongo {
|
||||
|
||||
/* TODO : MORE CHECKS HERE */
|
||||
|
||||
log() << "replSet TODO : don't allow removal of a node until we handle it at the removed node end?" << endl;
|
||||
DEV log() << "replSet TODO : don't allow removal of a node until we handle it at the removed node end?" << endl;
|
||||
// we could change its votes to zero perhaps instead as a short term...
|
||||
|
||||
return true;
|
||||
|
@ -1,4 +1,4 @@
|
||||
// collection.js - DBCollection support in the mongo shell
|
||||
// @file collection.js - DBCollection support in the mongo shell
|
||||
// db.colName is a DBCollection object
|
||||
// or db["colName"]
|
||||
|
||||
|
@ -1300,10 +1300,17 @@ const StringData _jscode_raw_utils =
|
||||
"rs.status = function () { return db._adminCommand(\"replSetGetStatus\"); }\n"
|
||||
"rs.isMaster = function () { return db.isMaster(); }\n"
|
||||
"rs.initiate = function (c) { return db._adminCommand({ replSetInitiate: c }); }\n"
|
||||
"rs.reconfig = function(cfg) {\n"
|
||||
"rs.reconfig = function (cfg) {\n"
|
||||
"cfg.version = rs.conf().version + 1;\n"
|
||||
"\n"
|
||||
"return db._adminCommand({ replSetReconfig: cfg });\n"
|
||||
"var res = null;\n"
|
||||
"try {\n"
|
||||
"res = db.adminCommand({ replSetReconfig: cfg });\n"
|
||||
"}\n"
|
||||
"catch (e) {\n"
|
||||
"print(\"shell got exception during reconfig: \" + e);\n"
|
||||
"print(\"in some circumstances, the primary steps down and closes connections on a reconfig\");\n"
|
||||
"}\n"
|
||||
"return res;\n"
|
||||
"}\n"
|
||||
"rs.add = function (hostport, arb) {\n"
|
||||
"var cfg = hostport;\n"
|
||||
@ -2639,7 +2646,7 @@ const StringData _jscode_raw_query =
|
||||
extern const JSFile query;
|
||||
const JSFile query = { "shell/query.js" , _jscode_raw_query };
|
||||
const StringData _jscode_raw_collection =
|
||||
"// collection.js - DBCollection support in the mongo shell\n"
|
||||
"// @file collection.js - DBCollection support in the mongo shell\n"
|
||||
"// db.colName is a DBCollection object\n"
|
||||
"// or db[\"colName\"]\n"
|
||||
"\n"
|
||||
|
@ -1294,11 +1294,18 @@ rs.help = function () {
|
||||
rs.slaveOk = function () { return db.getMongo().setSlaveOk(); }
|
||||
rs.status = function () { return db._adminCommand("replSetGetStatus"); }
|
||||
rs.isMaster = function () { return db.isMaster(); }
|
||||
rs.initiate = function (c) { return db._adminCommand({ replSetInitiate: c }); }
|
||||
rs.reconfig = function(cfg) {
|
||||
cfg.version = rs.conf().version + 1;
|
||||
|
||||
return db._adminCommand({ replSetReconfig: cfg });
|
||||
rs.initiate = function (c) { return db._adminCommand({ replSetInitiate: c }); }
|
||||
rs.reconfig = function (cfg) {
|
||||
cfg.version = rs.conf().version + 1;
|
||||
var res = null;
|
||||
try {
|
||||
res = db.adminCommand({ replSetReconfig: cfg });
|
||||
}
|
||||
catch (e) {
|
||||
print("shell got exception during reconfig: " + e);
|
||||
print("in some circumstances, the primary steps down and closes connections on a reconfig");
|
||||
}
|
||||
return res;
|
||||
}
|
||||
rs.add = function (hostport, arb) {
|
||||
var cfg = hostport;
|
||||
|
Loading…
Reference in New Issue
Block a user