summaryrefslogtreecommitdiff
path: root/src/mongo/db
diff options
context:
space:
mode:
authormatt dannenberg <matt.dannenberg@10gen.com>2014-06-09 10:03:44 -0400
committermatt dannenberg <matt.dannenberg@10gen.com>2014-06-10 06:13:31 -0400
commitfb81d9912660a6c71ffbafda33156f8935e98f65 (patch)
tree75dd9a41a0a979738ecda05b198ab3d4ae278053 /src/mongo/db
parent6dbb5ece65a84c220cf0a5ba1a08fd02f9a3d196 (diff)
downloadmongo-fb81d9912660a6c71ffbafda33156f8935e98f65.tar.gz
SERVER-13645 rename repl_start to repl_set_seed_list
Diffstat (limited to 'src/mongo/db')
-rw-r--r--src/mongo/db/repl/repl_coordinator_legacy.cpp6
-rw-r--r--src/mongo/db/repl/repl_set.h2
-rw-r--r--src/mongo/db/repl/repl_set_impl.cpp14
-rw-r--r--src/mongo/db/repl/repl_set_impl.h4
-rw-r--r--src/mongo/db/repl/repl_set_seed_list.cpp (renamed from src/mongo/db/repl/repl_start.cpp)10
-rw-r--r--src/mongo/db/repl/repl_set_seed_list.h (renamed from src/mongo/db/repl/repl_start.h)14
-rw-r--r--src/mongo/db/repl/rs.cpp10
-rw-r--r--src/mongo/db/repl/rs.h4
-rw-r--r--src/mongo/db/repl/rs_initiate.cpp4
9 files changed, 34 insertions, 34 deletions
diff --git a/src/mongo/db/repl/repl_coordinator_legacy.cpp b/src/mongo/db/repl/repl_coordinator_legacy.cpp
index 9a4501aabd2..70bff69209f 100644
--- a/src/mongo/db/repl/repl_coordinator_legacy.cpp
+++ b/src/mongo/db/repl/repl_coordinator_legacy.cpp
@@ -36,9 +36,9 @@
#include "mongo/db/repl/is_master.h"
#include "mongo/db/repl/master_slave.h"
#include "mongo/db/repl/oplog.h" // for newRepl()
+#include "mongo/db/repl/repl_set_seed_list.h"
#include "mongo/db/repl/repl_settings.h"
#include "mongo/db/repl/replset_commands.h"
-#include "mongo/db/repl/repl_start.h"
#include "mongo/db/repl/rs.h"
#include "mongo/util/assert_util.h" // TODO: remove along with invariant from getCurrentMemberState
#include "mongo/util/fail_point_service.h"
@@ -63,8 +63,8 @@ namespace repl {
newRepl();
replSet = true;
- ReplSetCmdline *replSetCmdline = new ReplSetCmdline(replSettings.replSet);
- boost::thread t(stdx::bind(&startReplSets, replSetCmdline));
+ ReplSetSeedList *replSetSeedList = new ReplSetSeedList(replSettings.replSet);
+ boost::thread t(stdx::bind(&startReplSets, replSetSeedList));
} else {
startMasterSlave();
}
diff --git a/src/mongo/db/repl/repl_set.h b/src/mongo/db/repl/repl_set.h
index 981e2ee708a..d1ef053125b 100644
--- a/src/mongo/db/repl/repl_set.h
+++ b/src/mongo/db/repl/repl_set.h
@@ -36,7 +36,7 @@ namespace repl {
class ReplSet : public ReplSetImpl {
public:
- static ReplSet* make(ReplSetCmdline& replSetCmdline);
+ static ReplSet* make(ReplSetSeedList& replSetSeedList);
virtual ~ReplSet() {}
// for the replSetStepDown command
diff --git a/src/mongo/db/repl/repl_set_impl.cpp b/src/mongo/db/repl/repl_set_impl.cpp
index c5b00f59c20..a9550c7a941 100644
--- a/src/mongo/db/repl/repl_set_impl.cpp
+++ b/src/mongo/db/repl/repl_set_impl.cpp
@@ -37,8 +37,8 @@
#include "mongo/db/repl/bgsync.h"
#include "mongo/db/repl/connections.h"
#include "mongo/db/repl/oplog.h"
+#include "mongo/db/repl/repl_set_seed_list.h"
#include "mongo/db/repl/repl_settings.h" // replSettings
-#include "mongo/db/repl/repl_start.h"
#include "mongo/s/d_logic.h"
#include "mongo/util/background.h"
#include "mongo/util/exit.h"
@@ -374,7 +374,7 @@ namespace {
b.append("me", myConfig().h.toString());
}
- void ReplSetImpl::init(ReplSetCmdline& replSetCmdline) {
+ void ReplSetImpl::init(ReplSetSeedList& replSetSeedList) {
mgr = new Manager(this);
_cfg = 0;
@@ -383,18 +383,18 @@ namespace {
lastH = 0;
changeState(MemberState::RS_STARTUP);
- _seeds = &replSetCmdline.seeds;
+ _seeds = &replSetSeedList.seeds;
LOG(1) << "replSet beginning startup..." << rsLog;
loadConfig();
- unsigned sss = replSetCmdline.seedSet.size();
+ unsigned sss = replSetSeedList.seedSet.size();
for (Member *m = head(); m; m = m->next()) {
- replSetCmdline.seedSet.erase(m->h());
+ replSetSeedList.seedSet.erase(m->h());
}
- for (set<HostAndPort>::iterator i = replSetCmdline.seedSet.begin();
- i != replSetCmdline.seedSet.end();
+ for (set<HostAndPort>::iterator i = replSetSeedList.seedSet.begin();
+ i != replSetSeedList.seedSet.end();
i++) {
if (i->isSelf()) {
if (sss == 1) {
diff --git a/src/mongo/db/repl/repl_set_impl.h b/src/mongo/db/repl/repl_set_impl.h
index 181e41194d8..935283aa216 100644
--- a/src/mongo/db/repl/repl_set_impl.h
+++ b/src/mongo/db/repl/repl_set_impl.h
@@ -48,7 +48,7 @@ namespace mongo {
namespace repl {
struct FixUpInfo;
- class ReplSetCmdline;
+ class ReplSetSeedList;
class ReplSetHealthPollTask;
class ReplicationStartSynchronizer {
@@ -236,7 +236,7 @@ namespace repl {
ReplSetImpl();
/* throws exception if a problem initializing. */
- void init(ReplSetCmdline&);
+ void init(ReplSetSeedList&);
void setSelfTo(Member *); // use this as it sets buildIndexes var
private:
diff --git a/src/mongo/db/repl/repl_start.cpp b/src/mongo/db/repl/repl_set_seed_list.cpp
index 9692974c7bf..6398010b1f0 100644
--- a/src/mongo/db/repl/repl_start.cpp
+++ b/src/mongo/db/repl/repl_set_seed_list.cpp
@@ -26,7 +26,7 @@
* it in the license file.
*/
-#include "mongo/db/repl/repl_start.h"
+#include "mongo/db/repl/repl_set_seed_list.h"
#include <boost/thread.hpp>
#include <iostream>
@@ -43,10 +43,10 @@ namespace mongo {
namespace repl {
/** @param cfgString <setname>/<seedhost1>,<seedhost2> */
- void parseReplsetCmdLine(const std::string& cfgString,
- string& setname,
- vector<HostAndPort>& seeds,
- set<HostAndPort>& seedSet ) {
+ void parseReplSetSeedList(const std::string& cfgString,
+ string& setname,
+ vector<HostAndPort>& seeds,
+ set<HostAndPort>& seedSet) {
const char *p = cfgString.c_str();
const char *slash = strchr(p, '/');
if( slash )
diff --git a/src/mongo/db/repl/repl_start.h b/src/mongo/db/repl/repl_set_seed_list.h
index ec5c52b8930..2dbf3ba7cdd 100644
--- a/src/mongo/db/repl/repl_start.h
+++ b/src/mongo/db/repl/repl_set_seed_list.h
@@ -36,18 +36,18 @@
namespace mongo {
namespace repl {
- void parseReplsetCmdLine(const std::string& cfgString,
- std::string& setname,
- vector<HostAndPort>& seeds,
- set<HostAndPort>& seedSet);
+ void parseReplSetSeedList(const std::string& cfgString,
+ std::string& setname,
+ vector<HostAndPort>& seeds,
+ set<HostAndPort>& seedSet);
/** Parameter given to the --replSet command line option (parsed).
Syntax is "<setname>/<seedhost1>,<seedhost2>"
where setname is a name and seedhost is "<host>[:<port>]" */
- class ReplSetCmdline {
+ class ReplSetSeedList {
public:
- ReplSetCmdline(const std::string& cfgString) {
- parseReplsetCmdLine(cfgString, setname, seeds, seedSet);
+ ReplSetSeedList(const std::string& cfgString) {
+ parseReplSetSeedList(cfgString, setname, seeds, seedSet);
}
std::string setname;
vector<HostAndPort> seeds;
diff --git a/src/mongo/db/repl/rs.cpp b/src/mongo/db/repl/rs.cpp
index ee32241039d..0c9b4104be1 100644
--- a/src/mongo/db/repl/rs.cpp
+++ b/src/mongo/db/repl/rs.cpp
@@ -66,9 +66,9 @@ namespace repl {
ReplSet::ReplSet() {
}
- ReplSet* ReplSet::make(ReplSetCmdline& replSetCmdline) {
+ ReplSet* ReplSet::make(ReplSetSeedList& replSetSeedList) {
auto_ptr<ReplSet> ret(new ReplSet());
- ret->init(replSetCmdline);
+ ret->init(replSetSeedList);
return ret.release();
}
@@ -119,16 +119,16 @@ namespace repl {
a separate thread takes over as ReplSetImpl::Manager, and this thread
terminates.
*/
- void startReplSets(ReplSetCmdline *replSetCmdline) {
+ void startReplSets(ReplSetSeedList *replSetSeedList) {
Client::initThread("rsStart");
try {
verify( theReplSet == 0 );
- if( replSetCmdline == 0 ) {
+ if( replSetSeedList == 0 ) {
verify(!replSet);
return;
}
replLocalAuth();
- (theReplSet = ReplSet::make(*replSetCmdline))->go();
+ (theReplSet = ReplSet::make(*replSetSeedList))->go();
}
catch(std::exception& e) {
log() << "replSet caught exception in startReplSets thread: " << e.what() << rsLog;
diff --git a/src/mongo/db/repl/rs.h b/src/mongo/db/repl/rs.h
index 20d1e14450d..0618d2959e2 100644
--- a/src/mongo/db/repl/rs.h
+++ b/src/mongo/db/repl/rs.h
@@ -68,10 +68,10 @@ namespace repl {
extern bool replSet; // true if using repl sets
extern class ReplSet *theReplSet; // null until initialized
- class ReplSetCmdline;
+ class ReplSetSeedList;
// Main entry point for replica sets
- void startReplSets(ReplSetCmdline *replSetCmdline);
+ void startReplSets(ReplSetSeedList *replSetSeedList);
bool isCurrentlyAReplSetPrimary();
diff --git a/src/mongo/db/repl/rs_initiate.cpp b/src/mongo/db/repl/rs_initiate.cpp
index c0cd5042abd..66a8b8bbe27 100644
--- a/src/mongo/db/repl/rs_initiate.cpp
+++ b/src/mongo/db/repl/rs_initiate.cpp
@@ -41,8 +41,8 @@
#include "mongo/db/dbhelpers.h"
#include "mongo/db/repl/heartbeat.h"
#include "mongo/db/repl/oplog.h"
+#include "mongo/db/repl/repl_set_seed_list.h" // parseReplSetSeedList
#include "mongo/db/repl/repl_settings.h" // replSettings
-#include "mongo/db/repl/repl_start.h" // parseReplsetCmdLine
#include "mongo/db/repl/replset_commands.h"
#include "mongo/db/repl/rs.h"
#include "mongo/db/repl/rs_config.h"
@@ -234,7 +234,7 @@ namespace repl {
string name;
vector<HostAndPort> seeds;
set<HostAndPort> seedSet;
- parseReplsetCmdLine(replSettings.replSet, name, seeds, seedSet); // may throw...
+ parseReplSetSeedList(replSettings.replSet, name, seeds, seedSet); // may throw...
bob b;
b.append("_id", name);