Permalink
Browse files

SERVER-9095 fix reconfig.js on Windows by removing Client from heartb…

…eat thread

The heartbeat thread has no use for a Client context, and it has trouble
at process shutdown time -- it tends to hit an access violation on Windows
when it tries to destruct the Client context.
  • Loading branch information...
1 parent 8e252ca commit 568e95e3dad7ee511565056db4f03586cd5ad018 @milkie milkie committed Jan 25, 2013
Showing with 1 addition and 8 deletions.
  1. +1 −8 src/mongo/db/repl/heartbeat.cpp
@@ -143,13 +143,6 @@ namespace mongo {
"checkEmpty" << checkEmpty <<
"from" << from );
- // generally not a great idea to do outbound waiting calls in a
- // write lock. heartbeats can be slow (multisecond to respond), so
- // generally we don't want to be locked, at least not without
- // thinking acarefully about it first.
- massert(15900, "can't heartbeat: too much lock",
- !Lock::somethingWriteLocked() || theReplSet == 0 || !theReplSet->lockedByMe() );
-
ScopedConn conn(memberFullName);
return conn.runCommand("admin",
cmd,
@@ -196,7 +189,7 @@ namespace mongo {
string name() const { return "rsHealthPoll"; }
- void setUp() { Client::initThread( name().c_str() ); }
+ void setUp() { }
void doWork() {
if ( !theReplSet ) {

0 comments on commit 568e95e

Please sign in to comment.