Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

tony found a bug

Revert "SERVER-1415: Giving incorrect parameter syntax to --replSet shows error in log but continues to run. Maybe it should abort like it does if the parameter is missing all together."

This reverts commit 7740fb4.
  • Loading branch information...
commit 6eeeeea25be1944bc667656e6b420639f194f0f9 1 parent 6e3522c
@erh erh authored
Showing with 7 additions and 5 deletions.
  1. +0 −1  db/db.cpp
  2. +7 −3 db/repl/rs.cpp
  3. +0 −1  jstests/storefunc.js
View
1  db/db.cpp
@@ -585,7 +585,6 @@ namespace mongo {
if( !cmdLine.replSet.empty() ) {
replSet = true;
- theReplSet = new ReplSet(cmdLine.replSet);
boost::thread t(startReplSets);
}
View
10 db/repl/rs.cpp
@@ -444,7 +444,7 @@ namespace mongo {
}
}
- /* forked as a thread during startup. theReplSet is already defined before fork.
+ /* forked as a thread during startup
it can run quite a while looking for config. but once found,
a separate thread takes over as ReplSetImpl::Manager, and this thread
terminates.
@@ -452,8 +452,12 @@ namespace mongo {
void startReplSets() {
Client::initThread("startReplSets");
try {
- assert( theReplSet );
- theReplSet->go();
+ assert( theReplSet == 0 );
+ if( cmdLine.replSet.empty() ) {
+ assert(!replSet);
+ return;
+ }
+ (theReplSet = new ReplSet(cmdLine.replSet))->go();
}
catch(std::exception& e) {
log() << "replSet caught exception in startReplSets thread: " << e.what() << rsLog;
View
1  jstests/storefunc.js
@@ -40,4 +40,3 @@ s.save( { _id : "zzz" , value : 5 } )
assert.eq( "number" , db.eval( function(){ return typeof(zzz); } ) , "C2" );
s.remove( { _id : "zzz" } );
assert.eq( "undefined" , db.eval( function(){ return typeof(zzz); } ) , "C3" );
-
Please sign in to comment.
Something went wrong with that request. Please try again.